blk-mq: don't allow merges if turned off for the queue
authorJens Axboe <axboe@fb.com>
Fri, 15 Aug 2014 18:44:08 +0000 (12:44 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:54 +0000 (12:54 -0600)
commit9b93bf28f8ac2838dbd8925f8b4bb0289cff5263
treeef909fe303c4b121b0e48d2dc1482d94b783ade8
parent00c6f33d8bc8753c484a22398302d796421dad51
blk-mq: don't allow merges if turned off for the queue

blk-mq uses BLK_MQ_F_SHOULD_MERGE, as set by the driver at init time,
to determine whether it should merge IO or not. However, this could
also be disabled by the admin, if merging is switched off through
sysfs. So check the general queue state as well before attempting
to merge IO.

Reported-by: Rob Elliott <Elliott@hp.com>
Tested-by: Rob Elliott <Elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c