Skip to content

RFC SCSI target logs

Anastasia Kovaleva linux-scsi target-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3target: core: Initial work on improving SCSI target logsinclude/target/target_core_base.h+25 -00 replies
2/3target: core: apply the new wrapper to spcdrivers/target/target_core_spc.c+12 -152 replies
3/3target: core: apply the new wrapper to iblockdrivers/target/target_core_iblock.c+45 -490 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] SCSI target logs

This patch is an initial work on scsi target logging improvement, that was discussed here:
https://lore.kernel.org/target-devel/[email protected]/
This is an example of how it will look.

Things worth mentioning:

1. I've decided not to implement target_lun_LEVEL() and implement target_cmd_LEVEL() instead because the mapped lun is stored in the se_cmd structure, and most of the time we already have the cmd when we want to log a lun.

2. Target prefix such as "core" or "iscsi" will be defined in the beginning of each file.

For example, you can test it with such command:

   sg_inq -f -c --page=255 /dev/sda

And the log output will look like that:

   [ 2229.586394] target core (iqn.1996-04.de.suse:01:6e84cb30fc63 -> 1/0): INQUIRY with EVPD==0 but PAGE CODE=ff

For bio errors log will look like that:

   [ 3354.495867] target iblock (iqn.1996-04.de.suse:01:6e84cb30fc63 -> 1/0): bio error: 0000000097ff0ac0, err: 10

I'll be thankful for your comments and suggestions. It would also be great if you could tell me whether it would be better to send the entire series for all modules at onse, or send patches for each module individually as soon as they are ready.

Kind regards,
Anastasia Kovaleva

Anastasia Kovaleva (3):
target: core: Initial work on improving SCSI target logs
target: core: apply the new wrapper to spc
target: core: apply the new wrapper to iblock

 drivers/target/target_core_iblock.c | 94 ++++++++++++++---------------
 drivers/target/target_core_spc.c    | 27 ++++-----
 include/target/target_core_base.h   | 25 ++++++++
 3 files changed, 82 insertions(+), 64 deletions(-)
Signature · 1 line
2.40.1