diff options
author | Kemeng Shi <shikemeng@huaweicloud.com> | 2023-01-18 12:37:23 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-02-06 19:22:28 +0300 |
commit | 4ea58fe456c21bb259a7cbf8498946f86e9b84aa (patch) | |
tree | 68b5468eb9e269a2a3b1198064205a10b92b3c8f /CREDITS | |
parent | e4ef2e05e0020db0d61b2cf451ef38a2bba33910 (diff) | |
download | linux-4ea58fe456c21bb259a7cbf8498946f86e9b84aa.tar.xz |
blk-mq: remove unnecessary error count and check in blk_mq_dispatch_rq_list
blk_mq_dispatch_rq_list will notify if hctx is busy in return bool. It will
return true if we are not busy and can handle more and return false on the
opposite. Inside blk_mq_dispatch_rq_list, errors is only used if list is
empty and we will return true if list is empty and (errors + queued) != 0.
There are three types of status returned from request:
-busy error BLK_STS*_RESOURCE: the failed request will be added back
to list and list will not be empty.
-BLK_STS_OK: We count queued for BLK_STS_OK
-rest error: We count errors for rest error
If list is empty, there is no request gets busy error then (errors +
queued) will be total requests in the list which is checked not empty at
beginning of blk_mq_dispatch_rq_list. So (errors + queued) != 0 is always
met if list is empty. Then the (errors + queued) != 0 check and errors
number count is not needed.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions