All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Shelekhin <k.shelekhin@yadro.com>
To: Mike Christie <michael.christie@oracle.com>
Cc: <target-devel@vger.kernel.org>
Subject: Re: SCSI target logs
Date: Sun, 21 May 2023 12:36:40 +0300	[thread overview]
Message-ID: <ZGnmKCzlijw9W-qt@yadro.com> (raw)
In-Reply-To: <3b0540bc-28f8-70d2-d6e5-755f15005cb8@oracle.com>

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.


  reply	other threads:[~2023-05-21  9:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 15:40 SCSI target logs Konstantin Shelekhin
2023-05-20 17:56 ` Mike Christie
2023-05-21  9:36   ` Konstantin Shelekhin [this message]
2023-05-23 15:40     ` Mike Christie
2023-05-24  8:54       ` Konstantin Shelekhin
2023-05-24 13:57         ` Konstantin Shelekhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZGnmKCzlijw9W-qt@yadro.com \
    --to=k.shelekhin@yadro.com \
    --cc=michael.christie@oracle.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.