Skip to content

Commit

Permalink
block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ming Lei authored and Jens Axboe committed Sep 23, 2015
1 parent 53cbf3b commit 5b5e20f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5b5e20f

Please sign in to comment.