From: Martin Wilck <mwilck@suse.com>
To: Bart Van Assche <bvanassche@acm.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>, Ming Lei <ming.lei@redhat.com>
Cc: James Bottomley <jejb@linux.vnet.ibm.com>,
linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH v4 3/6] scsi: merge scsi_internal_device_block() and device_block()
Date: Mon, 12 Jun 2023 18:06:56 +0200 [thread overview]
Message-ID: <d81c6330ba40d75277945d64f719b471eed4549a.camel@suse.com> (raw)
In-Reply-To: <50f5ba1e-8dc7-804f-7e43-cd838ff05ce7@acm.org>
On Mon, 2023-06-12 at 08:35 -0700, Bart Van Assche wrote:
> On 6/12/23 08:03, mwilck@suse.com wrote:
> > -static int scsi_internal_device_block(struct scsi_device *sdev)
> > +static void scsi_device_block(struct scsi_device *sdev, void
> > *data)
> > {
> > int err;
> >
> > @@ -2805,7 +2804,8 @@ static int scsi_internal_device_block(struct
> > scsi_device *sdev)
> > scsi_stop_queue(sdev, false);
> > mutex_unlock(&sdev->state_mutex);
> >
> > - return err;
> > + WARN_ONCE(err, "__scsi_internal_device_block_nowait(%s)
> > failed: err = %d\n",
> > + dev_name(&sdev->sdev_gendev), err);
> > }
>
> Hmm ... shouldn't the WARN_ONCE() statement refer to
> scsi_device_block()
> instead of __scsi_internal_device_block_nowait()?
The message references the function that failed, and prints the return
value of that function. It used to be scsi_internal_device_block()
before my patch, and it's __scsi_internal_device_block_nowait() now.
But I agree that the message is ugly. I'll to come up with something
better.
Thanks,
Martin
next prev parent reply other threads:[~2023-06-12 16:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 15:03 [PATCH v4 0/6] scsi: fixes for targets with many LUNs, and scsi_target_block rework mwilck
2023-06-12 15:03 ` [PATCH v4 1/6] bsg: increase number of devices mwilck
2023-06-12 15:03 ` [PATCH v4 2/6] scsi: sg: " mwilck
2023-06-12 15:03 ` [PATCH v4 3/6] scsi: merge scsi_internal_device_block() and device_block() mwilck
2023-06-12 15:35 ` Bart Van Assche
2023-06-12 16:06 ` Martin Wilck [this message]
2023-06-12 15:03 ` [PATCH v4 4/6] scsi: don't wait for quiesce in scsi_stop_queue() mwilck
2023-06-12 15:40 ` Bart Van Assche
2023-06-12 15:03 ` [PATCH v4 5/6] scsi: don't wait for quiesce in scsi_device_block() mwilck
2023-06-12 15:03 ` [PATCH v4 6/6] scsi: replace scsi_target_block() by scsi_block_targets() mwilck
2023-06-12 15:49 ` Bart Van Assche
[not found] <20230612145638.16999-1-mwilck@suse.com>
[not found] ` <20230612145638.16999-4-mwilck@suse.com>
2023-06-12 15:35 ` [PATCH v4 3/6] scsi: merge scsi_internal_device_block() and device_block() Hannes Reinecke
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=d81c6330ba40d75277945d64f719b471eed4549a.camel@suse.com \
--to=mwilck@suse.com \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox