Files
s390-tools/scripts/zfcpdbf
Steffen Maier 094057e265 zfcpdbf: fix missing "FCP rsp IU all" fields if PAY record wrapped away
Had a confusing decoded trace record:

Timestamp      : ...
Area           : SCSI
...
Tag            : rsl_err
...
SCSI result    : 0x00000002
SCSI opcode    : 1a...
FCP rsp inf cod: 0x00
FCP rsp IU     : 00000000 00000000 00000a02 000000ff
                 00000012 00000000
                       ^^

and was wondering where that sense data would be or if the
corresponding PAY record "fcp_riu" was lost due to trace area wrapping.
So the fix here adds the following two lines to the same trace record:

FCP rsp IU len : 42
FCP rsp IU all : record not available anymore.

Similarly, the following LUN reset Task Management Function response
was missing the last two lines regarding the full FCP response IU
and its optional part with the FCP response info:

Timestamp      : ...
Area           : SCSI
...
Tag            : lr_okay
...
FCP rsp inf cod: 0x00
FCP rsp IU     : 00000000 00000000 00000100 00000000
                 00000000 00000008
                                ^^
FCP rsp IU len : 32
FCP rsp IU all : record not available anymore.

As of today, depending on the kernel version we have
either fcp_sns or fcp_riu PAY trace records. See Linux kernel v4.14 commit
12c3e5754c80 ("scsi: zfcp: fix payload with full FCP_RSP IU in SCSI trace
records").
Always print non-zero payload length independent of payload type.
Actually this also fixes a regression for wrapped away fcp_sns.
If there is no fcp_sns it either wrapped away or it's a kernel with fcp_riu.
Only print fcp_riu if it contains more content than the preceding
unconditional fixed-size field "FCP rsp IU".

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Fedor Loshakov <loshakov@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2021-10-01 14:58:17 +02:00

38 KiB
Executable File