]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop
authorMing Lei <ming.lei@canonical.com>
Sun, 28 Jun 2015 06:06:32 +0000 (23:06 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Wed, 29 Jul 2015 23:37:04 +0000 (16:37 -0700)
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>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
drivers/block/loop.c

index cef6fa83a2740e2cd6aca4f9450b48429b99e9e1..e4708e81d2cd4200366bb0d8ca0d77ffd3a99956 100644 (file)
@@ -1572,6 +1572,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);