Skip to content

Commit 5b5e20f

Browse files
Ming Leiaxboe
authored andcommitted
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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 53cbf3b commit 5b5e20f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/block/loop.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,12 @@ static int loop_add(struct loop_device **l, int i)
15951595
}
15961596
lo->lo_queue->queuedata = lo;
15971597

1598+
/*
1599+
* It doesn't make sense to enable merge because the I/O
1600+
* submitted to backing file is handled page by page.
1601+
*/
1602+
queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue);
1603+
15981604
INIT_LIST_HEAD(&lo->write_cmd_head);
15991605
INIT_WORK(&lo->write_work, loop_queue_write_work);
16001606

0 commit comments

Comments
 (0)