public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] SCSI target logs
@ 2023-07-26 11:55 Anastasia Kovaleva
  2023-07-26 11:55 ` [RFC PATCH 1/3] target: core: Initial work on improving " Anastasia Kovaleva
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Anastasia Kovaleva @ 2023-07-26 11:55 UTC (permalink / raw)
  To: martin.petersen, michael.christie; +Cc: linux-scsi, target-devel, linux

This patch is an initial work on scsi target logging improvement, that
was discussed here:
https://lore.kernel.org/target-devel/ZF0MiCRW8HWm8YYj@yadro.com/
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(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-26 16:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 11:55 [RFC PATCH 0/3] SCSI target logs Anastasia Kovaleva
2023-07-26 11:55 ` [RFC PATCH 1/3] target: core: Initial work on improving " Anastasia Kovaleva
2023-07-26 11:55 ` [RFC PATCH 2/3] target: core: apply the new wrapper to spc Anastasia Kovaleva
2023-07-26 15:15   ` Bart Van Assche
2023-07-26 16:18     ` [DMARC Error]Re: " Konstantin Shelekhin
2023-07-26 11:55 ` [RFC PATCH 3/3] target: core: apply the new wrapper to iblock Anastasia Kovaleva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox