summaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2015-05-08 13:51:33 -0400
committerJens Axboe <axboe@fb.com>2015-05-08 16:17:23 -0400
commit5b3f341f098d60da2970758db6a05bd851eb6b39 (patch)
treefd25ff2f67ac583a02f2cd288b7419609d373d00 /block/blk.h
parentf984df1f0f71ef96254411fc3576a10ae561be71 (diff)
blk-mq: make plug work for mutiple disks and queues
Last patch makes plug work for multiple queue case. However it only works for single disk case, because it assumes only one request in the plug list. If a task is accessing multiple disks, eg MD/DM, the assumption is wrong. Let blk_attempt_plug_merge() record request from the same queue. V2: use NULL parameter in !mq case. Fix a bug. Add comments in blk_attempt_plug_merge to make it less (hopefully) confusion. Cc: Jens Axboe <axboe@fb.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk.h b/block/blk.h
index 4b48d55e588e..026d9594142b 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -78,7 +78,8 @@ bool bio_attempt_front_merge(struct request_queue *q, struct request *req,
78bool bio_attempt_back_merge(struct request_queue *q, struct request *req, 78bool bio_attempt_back_merge(struct request_queue *q, struct request *req,
79 struct bio *bio); 79 struct bio *bio);
80bool blk_attempt_plug_merge(struct request_queue *q, struct bio *bio, 80bool blk_attempt_plug_merge(struct request_queue *q, struct bio *bio,
81 unsigned int *request_count); 81 unsigned int *request_count,
82 struct request **same_queue_rq);
82 83
83void blk_account_io_start(struct request *req, bool new_io); 84void blk_account_io_start(struct request *req, bool new_io);
84void blk_account_io_completion(struct request *req, unsigned int bytes); 85void blk_account_io_completion(struct request *req, unsigned int bytes);