diff options
author | Hannes Reinecke <hare@suse.de> | 2011-11-09 08:39:24 +0100 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2012-02-11 15:38:00 +0100 |
commit | dcac16cc73ba5ebb392a77988794f8a7f6772528 (patch) | |
tree | 0ebe127441141011e80f05c546a0367b1b607533 /drivers | |
parent | 68a59259b9e3c467a65caa7ef1d0dad465de1015 (diff) |
SCSI: Silencing 'killing requests for dead queue'
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 <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index e34afc5a877..9899f6e4c5e 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1400,6 +1400,8 @@ static void scsi_kill_request(struct request *req, struct request_queue *q) BUG(); } + scmd_printk(KERN_INFO, cmd, "killing request\n"); + scsi_init_cmd_errh(cmd); cmd->result = DID_NO_CONNECT << 16; atomic_inc(&cmd->device->iorequest_cnt); @@ -1473,7 +1475,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 = elv_next_request(q)) != NULL) scsi_kill_request(req, q); return; |