]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: include errors in did_work calculation
authorJens Axboe <axboe@fb.com>
Fri, 24 Mar 2017 18:04:19 +0000 (12:04 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 29 Mar 2017 19:21:13 +0000 (13:21 -0600)
commitd6f23f4859da8dc6587d6f951c997d02080e34ac
tree2dc1ab560a43db60c592492cc2825d9666a193a2
parenta8f1e209fda6bbbe05f058a3f115807e8537b47f
blk-mq: include errors in did_work calculation

Currently we return true in blk_mq_dispatch_rq_list() if we queued IO
successfully, but we really want to return whether or not the we made
progress. Progress includes if we got an error return.  If we don't,
this can lead to a hang in blk_mq_sched_dispatch_requests() when a
driver is draining IO by returning BLK_MQ_QUEUE_ERROR instead of
manually ending the IO in error and return BLK_MQ_QUEUE_OK.

Tested-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c