public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Silencing 'killing requests for dead queue'
@ 2011-11-09  7:39 Hannes Reinecke
  2011-11-09 11:53 ` Bart Van Assche
  2011-11-10  2:10 ` Stephen Rothwell
  0 siblings, 2 replies; 6+ messages in thread
From: Hannes Reinecke @ 2011-11-09  7:39 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, Hannes Reinecke

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;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-10 12:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-11-10  2:10 ` Stephen Rothwell
2011-11-10 11:57   ` Bart Van Assche
2011-11-10 12:13     ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox