Skip to content

Commit

Permalink
[SCSI] Silencing 'killing requests for dead queue'
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
hreinecke authored and James Bottomley committed Nov 9, 2011
1 parent 4e6c82b commit 7457181
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7457181

Please sign in to comment.