Commit 09e797c
scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed
If scsi_dispatch_cmd() failed, the SCSI command was not sent to the target,
scsi_queue_rq() would return BLK_STS_RESOURCE and the related request would
be requeued. The timeout of this request would not fire, no one would
increase iodone_cnt.
The above flow would result the iodone_cnt smaller than iorequest_cnt. So
decrease the iorequest_cnt if dispatch failed to workaround the issue.
Signed-off-by: Wenchao Hao <[email protected]>
Reported-by: Ming Lei <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ming Lei <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 6ca9818 commit 09e797c
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1485 | 1485 | | |
1486 | 1486 | | |
1487 | 1487 | | |
| 1488 | + | |
1488 | 1489 | | |
1489 | 1490 | | |
1490 | 1491 | | |
| |||
1517 | 1518 | | |
1518 | 1519 | | |
1519 | 1520 | | |
| 1521 | + | |
1520 | 1522 | | |
1521 | 1523 | | |
1522 | 1524 | | |
| |||
0 commit comments