From: Ming Lei Date: Mon, 17 Aug 2015 02:31:47 +0000 (+0800) Subject: block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5b5e20f421c0b6d437b3dec13e53674161998d56;p=linux-beck.git 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 Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/drivers/block/loop.c b/drivers/block/loop.c index f9889b6bc02c..eee751032cad 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);