Subject: Re: scsi: killing requests for dead queue

From: Bart Van Assche <[email-masked]>
Date: Fri, 4 Nov 2011 18:38:45 +0100

On Thursday 03 November 2011 22:23:24 you wrote:
> First saw these messages on next-20111102 (but my previous build from linux-next
> was next-20111017 ... so a big gap).  Still there today in next-20111103. Not seeing
> these messages from Linus 3.2 merge window builds.
> 
> scsi: killing requests for dead queue

Does the patch below help ?

[PATCH] [SCSI] Silence queue cleanup code

Commit 3308511 causes the SCSI queue cleanup code to be invoked
for every killed queue. Since the SCSI scanning code can create
and destroy SCSI queues repeatedly while probing LUNs, the
following message can be printed several times during boot:

    scsi: killing requests for dead queue

This confuses users, so change the severity of that message to
KERN_DEBUG.

See also http://marc.info/?l=linux-scsi&m=132035543616061.

Signed-off-by: Bart Van Assche <[email-masked]>
Reported-by: Tony Luck <[email-masked]>
Cc: <[email-masked]>
Cc: James Bottomley <[email-masked]>
---
 drivers/scsi/scsi_lib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index b4d43ae..79ce802 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1489,7 +1489,7 @@ static void scsi_request_fn(struct request_queue *q)
 	struct request *req;
 
 	if (!sdev) {
-		printk("scsi: killing requests for dead queue\n");
+		pr_debug("scsi: killing requests for dead queue\n");
 		while ((req = blk_peek_request(q)) != NULL)
 			scsi_kill_request(req, q);
 		return;
-- 
1.7.3.4