blk-mq: make plug work for mutiple disks and queues
authorShaohua Li <shli@fb.com>
Fri, 8 May 2015 17:51:33 +0000 (10:51 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 8 May 2015 20:17:23 +0000 (14:17 -0600)
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>
block/blk-core.c
block/blk-mq.c
block/blk.h

Simple merge
diff --cc block/blk-mq.c
Simple merge
diff --cc block/blk.h
Simple merge