Commit 463cdad83823830dd59572fb81ac243f6a44b589

Authored by Maurizio Lombardi
Committed by Martin K. Petersen
1 parent 893ca250ed

scsi: core: use scmd_printk() to print which command timed out

With a possibly faulty disk the following messages may appear in the logs:

kernel: sd 0:0:9:0: timing out command, waited 180s
kernel: sd 0:0:9:0: timing out command, waited 20s
kernel: sd 0:0:9:0: timing out command, waited 20s
kernel: sd 0:0:9:0: timing out command, waited 60s
kernel: sd 0:0:9:0: timing out command, waited 20s

This is not very informative because it's not possible to identify the
command that timed out.

This patch replaces sdev_printk() with scmd_printk().

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/scsi/scsi_lib.c
... ... @@ -1452,7 +1452,7 @@
1452 1452 disposition = scsi_decide_disposition(cmd);
1453 1453 if (disposition != SUCCESS &&
1454 1454 time_before(cmd->jiffies_at_alloc + wait_for, jiffies)) {
1455   - sdev_printk(KERN_ERR, cmd->device,
  1455 + scmd_printk(KERN_ERR, cmd,
1456 1456 "timing out command, waited %lus\n",
1457 1457 wait_for/HZ);
1458 1458 disposition = SUCCESS;