Skip to content

Commit

Permalink
scsi: core: use scmd_printk() to print which command timed out
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Ewan D. Milne <[email protected]>
Reviewed-by: Ming Lei <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
maurizio-lombardi authored and martinkpetersen committed Jul 12, 2019
1 parent 893ca25 commit 463cdad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ static void scsi_softirq_done(struct request *rq)
disposition = scsi_decide_disposition(cmd);
if (disposition != SUCCESS &&
time_before(cmd->jiffies_at_alloc + wait_for, jiffies)) {
sdev_printk(KERN_ERR, cmd->device,
scmd_printk(KERN_ERR, cmd,
"timing out command, waited %lus\n",
wait_for/HZ);
disposition = SUCCESS;
Expand Down

0 comments on commit 463cdad

Please sign in to comment.