diff options
author | Ming Lei <ming.lei@redhat.com> | 2020-07-07 11:04:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-16 08:13:34 +0200 |
commit | 1506084b7799564f6da07c1eae57051a7afc1d51 (patch) | |
tree | 11b68bf8158c56f46add4707fa9b93677e4b8008 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 4bf31fc4705fc72e10a42ae580708808b211dc1c (diff) | |
download | linux-stable-1506084b7799564f6da07c1eae57051a7afc1d51.tar.gz linux-stable-1506084b7799564f6da07c1eae57051a7afc1d51.tar.bz2 linux-stable-1506084b7799564f6da07c1eae57051a7afc1d51.zip |
blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight()
commit 05a4fed69ff00a8bd83538684cb602a4636b07a7 upstream.
dm-multipath is the only user of blk_mq_queue_inflight(). When
dm-multipath calls blk_mq_queue_inflight() to check if it has
outstanding IO it can get a false negative. The reason for this is
blk_mq_rq_inflight() doesn't consider requests that are no longer
MQ_RQ_IN_FLIGHT but that are now MQ_RQ_COMPLETE (->complete isn't
called or finished yet) as "inflight".
This causes request-based dm-multipath's dm_wait_for_completion() to
return before all outstanding dm-multipath requests have actually
completed. This breaks DM multipath's suspend functionality because
blk-mq requests complete after DM's suspend has finished -- which
shouldn't happen.
Fix this by considering any request not in the MQ_RQ_IDLE state
(so either MQ_RQ_COMPLETE or MQ_RQ_IN_FLIGHT) as "inflight" in
blk_mq_rq_inflight().
Fixes: 3c94d83cb3526 ("blk-mq: change blk_mq_queue_busy() to blk_mq_queue_inflight()")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions