summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2015-08-17 10:31:47 +0800
committerJens Axboe <axboe@fb.com>2015-09-23 11:01:16 -0600
commit5b5e20f421c0b6d437b3dec13e53674161998d56 (patch)
tree60a9dfefe72548972f93755669586b825c7c3383
parent53cbf3b157a0428d40989ab1c7df9228a1976fc2 (diff)
downloadop-kernel-dev-5b5e20f421c0b6d437b3dec13e53674161998d56.zip
op-kernel-dev-5b5e20f421c0b6d437b3dec13e53674161998d56.tar.gz
block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop
It doesn't make sense to enable merge because the I/O submitted to backing file is handled page by page. Signed-off-by: Ming Lei <ming.lei@canonical.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--drivers/block/loop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f9889b6..eee7510 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1595,6 +1595,12 @@ static int loop_add(struct loop_device **l, int i)
}
lo->lo_queue->queuedata = lo;
+ /*
+ * It doesn't make sense to enable merge because the I/O
+ * submitted to backing file is handled page by page.
+ */
+ queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue);
+
INIT_LIST_HEAD(&lo->write_cmd_head);
INIT_WORK(&lo->write_work, loop_queue_write_work);
OpenPOWER on IntegriCloud