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-27 11:53:57 -07:00
2023-04-27 11:53:57 -07:00
2023-05-07 10:00:09 -07:00
2023-04-27 16:36:55 -07:00
2023-05-02 10:41:31 -07:00
2023-04-27 11:53:57 -07:00
2023-04-30 11:51:51 -07:00
2023-04-27 11:53:57 -07:00
2023-05-03 11:11:56 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 11:27:48 -07:00
2023-04-29 17:42:33 -07:00
2023-04-27 12:07:50 -07:00
2023-05-03 11:00:27 -07:00
2023-05-05 11:49:22 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 10:09:05 -07:00
2023-04-27 17:17:12 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 12:07:50 -07:00
2023-05-01 17:18:56 -07:00
2023-04-27 16:36:55 -07:00
2023-04-30 13:00:38 -07:00
2023-05-05 19:12:01 -07:00
2023-05-02 10:36:02 -07:00
2023-04-28 16:24:32 -07:00
2023-05-06 08:28:58 -07:00
2023-04-30 13:00:38 -07:00
2023-04-25 12:02:16 -07:00
2023-04-28 14:02:54 -07:00
2023-05-02 10:41:31 -07:00
2023-04-28 14:02:54 -07:00
2023-04-27 11:46:26 -07:00
2023-05-05 19:12:01 -07:00
2023-05-07 10:00:09 -07:00
2023-04-27 16:36:55 -07:00
2023-05-05 13:27:59 -07:00
2023-04-27 10:09:05 -07:00
2023-04-30 11:51:51 -07:00
2023-05-05 11:57:29 -07:00
2023-04-27 16:36:55 -07:00
2023-04-27 11:53:57 -07:00
2023-05-03 11:25:01 -07:00
2023-04-27 16:36:55 -07:00
2023-04-27 11:53:57 -07:00
2023-05-02 10:41:31 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 16:36:55 -07:00
2023-04-27 12:07:50 -07:00
2023-04-27 16:36:55 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 12:07:50 -07:00
2023-05-16 21:07:26 -04:00
2023-04-27 12:07:50 -07:00
2023-05-02 11:56:43 -07:00
2023-04-28 14:53:30 -07:00
2023-05-02 10:46:11 -07:00
2023-04-27 10:09:05 -07:00
2023-04-27 12:07:50 -07:00
2023-05-04 18:33:56 -07:00
2023-04-27 17:27:06 -07:00