Re: SCSI target logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 20, 2023 at 12:56:29PM -0500, Mike Christie wrote:
> On 5/11/23 10:40 AM, Konstantin Shelekhin wrote:
> > So, my proposal. We should give all modules similar names:
> >
> >   tcm
> >   tcm_iscsi
> >   tcm_iser
> >   tcm_qla2xxx
> >   tcm_iblock
> >   tcm_loop
> >   tcm_cxgb
> 
> Do you mean you will rename the actual modules, or just have each module
> have some define with a name like "tcm_$WHATEVER" that's used in the log
> message?
> 
> I don't think we can change the actual name because scripts might do
> modprobe isert
> 
> Unless there's a way to do some sort of automatic/magic alias then it
> would be ok.

We have MODULE_ALIAS(), so it's possible to do something similar to
drivers/md/raid5.c:

  # lsmod | grep -c '^raid456'
  0
  # modprobe raid5
  # lsmod | grep '^raid456'
  raid456               204800  0
  # doas rmmod raid456
  # lsmod | grep -c '^raid456'
  0
  # doas modprobe raid6
  # lsmod | grep '^raid456'
  raid456               204800  0 
 
> > I would prefer scsit_ instead of tcm_, but I guess this ship has sailed.
> >
> > Next, let's introduce some macros: tcm_LEVEL(), tcm_sess_LEVEL() and
> 
> We've been switching new code to the "target_" prefix.

Yeah, forgot about that. target_LEVEL() and target_sess_LEVEL() then.
 
> > tcm_lun_LEVEL():
> >
> >   tcm_err("This module blew up\n")
> >   [Thu May 11 00:00:00 2023] tcm_iser: This module blew up
> >                              ^^^^^^^^
> >                              |
> >                              Module name
> >
> >   tcm_sess_err(&se_sess, "Waiting for running cmds to complete.\n")
> >   [Thu May 11 00:00:00 2023] tcm_iscsi [iqn.2023-01.com.example:blah-blah -> 10]: Waiting for running cmds to complete.
> >                              ^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    ^^
> >                              |          |                                    |
> >                              |          |                                    RTPI
> >                              |          Initiator port
> >                              Module name
> >
> >   tcm_lun_err(&se_lun, "bio error %p, err: %d\n", bio, bio_status)
> >   [Thu May 11 00:00:00 2023] tcm_iblock [iqn.2023-01.com.example:blah-blah -> 10/5]: bio error: 0xfffffffff, err 10
> >                              ^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    ^^ ^
> >                              |           |                                    |  |
> >                              |           |                                    |  MAPPED LUN
> >                              |           |                                    RTPI
> >                              |           Initiator port
> >                              Module name
> 
> Nice.

Sweet! If you approve the general idea, we'll start working on the RFC
patch series.




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux