Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 463cdad8 authored by Maurizio Lombardi's avatar Maurizio Lombardi Committed by Martin K. Petersen
Browse files

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: default avatarMaurizio Lombardi <mlombard@redhat.com>
Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 893ca250
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;