summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2017-01-26 12:28:10 -0700
committerJens Axboe <axboe@fb.com>2017-01-27 08:20:30 -0700
commit0abad774124351ba211b9053786ebd5a5a722d53 (patch)
treee8379de61d26569c1ad82639623a22eb3b8b39c8 /block/blk-mq.c
parent4a46f05ebf9921dcba35770106e42574d323d6dd (diff)
downloadlinux-stable-0abad774124351ba211b9053786ebd5a5a722d53.tar.gz
linux-stable-0abad774124351ba211b9053786ebd5a5a722d53.tar.bz2
linux-stable-0abad774124351ba211b9053786ebd5a5a722d53.zip
blk-mq: improve scheduler queue sync/async running
We'll use the same criteria for whether we need to run the queue sync or async when we have a scheduler, as we do without one. Signed-off-by: Jens Axboe <axboe@fb.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Tested-by: Hannes Reinecke <hare@suse.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index ede835c2b08b..1f948d5c2715 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1476,7 +1476,8 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
if (q->elevator) {
blk_mq_put_ctx(data.ctx);
blk_mq_bio_to_request(rq, bio);
- blk_mq_sched_insert_request(rq, false, true, true);
+ blk_mq_sched_insert_request(rq, false, true,
+ !is_sync || is_flush_fua);
goto done;
}
if (!blk_mq_merge_queue_io(data.hctx, data.ctx, rq, bio)) {
@@ -1585,7 +1586,8 @@ static blk_qc_t blk_sq_make_request(struct request_queue *q, struct bio *bio)
if (q->elevator) {
blk_mq_put_ctx(data.ctx);
blk_mq_bio_to_request(rq, bio);
- blk_mq_sched_insert_request(rq, false, true, true);
+ blk_mq_sched_insert_request(rq, false, true,
+ !is_sync || is_flush_fua);
goto done;
}
if (!blk_mq_merge_queue_io(data.hctx, data.ctx, rq, bio)) {