Wenchao Hao 09e797c864 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 <haowenchao2@huawei.com>
Reported-by: Ming Lei <ming.lei@redhat.com>
Closes: https://lore.kernel.org/r/ZF+zB+bB7iqe0wGd@ovpn-8-17.pek2.redhat.com
Link: https://lore.kernel.org/r/20230515070156.1790181-3-haowenchao2@huawei.com
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-05-16 21:56:35 -04:00
..
2023-04-26 16:07:23 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 16:36:55 -07:00
2023-04-27 11:53:57 -07:00
2023-04-26 15:39:25 -07:00
2023-04-26 15:39:25 -07:00
2023-04-26 15:39:25 -07:00
2023-04-18 23:01:23 -04:00
2023-04-26 15:39:25 -07:00
2023-04-18 23:01:23 -04:00
2022-06-27 22:56:21 -04:00
2023-04-27 11:53:57 -07:00
2022-02-22 21:11:02 -05:00
2022-05-08 14:28:18 -04:00
2023-04-03 09:33:30 +02:00
2023-04-27 11:53:57 -07:00
2021-12-22 23:41:13 -05:00
2023-04-02 21:36:47 -04:00
2022-10-07 12:33:18 -07:00