public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: James Bottomley <jbottomley@parallels.com>,
	linux-scsi@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] Silencing 'killing requests for dead queue'
Date: Wed, 09 Nov 2011 13:24:09 +0100	[thread overview]
Message-ID: <4EBA70E9.8070704@suse.de> (raw)
In-Reply-To: <CAO+b5-r148yneG_h3PyfP9D8BGf5x7e7XKuY73BVtPTTRPkFuQ@mail.gmail.com>

On 11/09/2011 12:53 PM, Bart Van Assche wrote:
> On Wed, Nov 9, 2011 at 8:39 AM, Hannes Reinecke<hare@suse.de>  wrote:
>> When we tear down a device we try to flush all outstanding
>> commands in scsi_free_queue(). However the check in
>> scsi_request_fn() is imperfect as it only signals that
>> we _might start_ aborting commands, not that we've actually
>> aborted some.
>> So move the printk inside the scsi_kill_request function,
>> this will also give us a hint about which commands are aborted.
>>
>> Signed-off-by: Hannes Reinecke<hare@suse.de>
>>
>> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
>> index 06bc265..f85cfa6 100644
>> --- a/drivers/scsi/scsi_lib.c
>> +++ b/drivers/scsi/scsi_lib.c
>> @@ -1409,6 +1409,8 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
>>
>>         blk_start_request(req);
>>
>> +       scmd_printk(KERN_INFO, cmd, "killing request\n");
>> +
>>         sdev = cmd->device;
>>         starget = scsi_target(sdev);
>>         shost = sdev->host;
>> @@ -1490,7 +1492,6 @@ static void scsi_request_fn(struct request_queue *q)
>>         struct request *req;
>>
>>         if (!sdev) {
>> -               printk("scsi: killing requests for dead queue\n");
>>                 while ((req = blk_peek_request(q)) != NULL)
>>                         scsi_kill_request(req, q);
>>                 return;
>
> Can this message appear during LUN scanning and hence confuse users ?
>
Precisely.

Which incidentally also tells us that none of the maintainer tested 
the original patch on SCSI parallel machines :-)

> Also, patch 3308511 is already present in several stable trees so
> shouldn't a patch like the above CC stable@vger.kernel.org too ?
>
Oh. Of course.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-11-09 12:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09  7:39 [PATCH] Silencing 'killing requests for dead queue' Hannes Reinecke
2011-11-09 11:53 ` Bart Van Assche
2011-11-09 12:24   ` Hannes Reinecke [this message]
2011-11-10  2:10 ` Stephen Rothwell
2011-11-10 11:57   ` Bart Van Assche
2011-11-10 12:13     ` Stephen Rothwell

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=4EBA70E9.8070704@suse.de \
    --to=hare@suse.de \
    --cc=bvanassche@acm.org \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox