summaryrefslogtreecommitdiff
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-08-31 22:09:45 -0700
committerJens Axboe <axboe@kernel.dk>2017-09-01 08:44:32 -0600
commit54bb0ade6627a183c211345761ec46e4bf0048fe (patch)
tree7cb1c96d8825d0cc8e537f7269730aa56529e924 /drivers/block/loop.c
parent2670cd1674055ab48a9607472c5ff14781b9b2ea (diff)
downloadlwn-54bb0ade6627a183c211345761ec46e4bf0048fe.tar.gz
lwn-54bb0ade6627a183c211345761ec46e4bf0048fe.zip
block/loop: set hw_sectors
Loop can handle any size of request. Limiting it to 255 sectors just burns the CPU for bio split and request merge for underlayer disk and also cause bad fs block allocation in directio mode. Reviewed-by: Omar Sandoval <osandov@fb.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f6c204f62b1e..9eff4d3ab1f3 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1736,6 +1736,7 @@ static int loop_add(struct loop_device **l, int i)
blk_queue_physical_block_size(lo->lo_queue, PAGE_SIZE);
+ blk_queue_max_hw_sectors(lo->lo_queue, BLK_DEF_MAX_SECTORS);
/*
* It doesn't make sense to enable merge because the I/O
* submitted to backing file is handled page by page.