forked from jamesbulpin/xcp-linux-2.6.32.pq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2.6.32.50.20.scsi-silencing-killing-requests-for-dead-queue.patch
44 lines (36 loc) · 1.39 KB
/
2.6.32.50.20.scsi-silencing-killing-requests-for-dead-queue.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 745718132c3c7cac98a622b610e239dcd5217f71 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <[email protected]>
Date: Wed, 9 Nov 2011 08:39:24 +0100
Subject: SCSI: Silencing 'killing requests for dead queue'
From: Hannes Reinecke <[email protected]>
commit 745718132c3c7cac98a622b610e239dcd5217f71 upstream.
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 <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/scsi/scsi_lib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1382,6 +1382,8 @@ static void scsi_kill_request(struct req
BUG();
}
+ scmd_printk(KERN_INFO, cmd, "killing request\n");
+
sdev = cmd->device;
starget = scsi_target(sdev);
shost = sdev->host;
@@ -1468,7 +1470,6 @@ static void scsi_request_fn(struct reque
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;