block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop
authorMing Lei <ming.lei@canonical.com>
Mon, 17 Aug 2015 02:31:47 +0000 (10:31 +0800)
committerJens Axboe <axboe@fb.com>
Wed, 23 Sep 2015 17:01:16 +0000 (11:01 -0600)
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>
drivers/block/loop.c

index f9889b6..eee7510 100644 (file)
@@ -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);