diff options
author | Yufen Yu <yuyufen@huawei.com> | 2020-07-16 09:52:01 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-07-17 16:14:28 +0300 |
commit | b5718d6c00afe51ce5327cf2beae4019da0c8e74 (patch) | |
tree | 6737291920782b8fbaf65f97419c9d492a395326 /block/blk-map.c | |
parent | 943c4d9074aa05b86af89eec25330c1995e807c9 (diff) | |
download | linux-b5718d6c00afe51ce5327cf2beae4019da0c8e74.tar.xz |
block: defer flush request no matter whether we have elevator
Commit 7520872c0cf4 ("block: don't defer flushes on blk-mq + scheduling")
tried to fix deadlock for cycled wait between flush requests and data
request into flush_data_in_flight. The former holded all driver tags
and wait for data request completion, but the latter can not complete
for waiting free driver tags.
After commit 923218f6166a ("blk-mq: don't allocate driver tag upfront
for flush rq"), flush requests will not get driver tag before queuing
into flush queue.
* With elevator, flush request just get sched_tags before inserting
flush queue. It will not get driver tag until issue them to driver.
data request on list fq->flush_data_in_flight will complete in
the end.
* Without elevator, each flush request will get a driver tag when
allocate request. Then data request on fq->flush_data_in_flight
don't worry about lacking driver tag.
In both of these cases, cycled wait cannot be true. So we may allow
to defer flush request.
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-map.c')
0 files changed, 0 insertions, 0 deletions