Thread (4 messages) 4 messages, 2 authors, 2017-09-01
STALE3224d REVIEWED: 2 (0M)
Revisions (3)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current

[PATCH V3 1/2] block/loop: set hw_sectors

From: Shaohua Li <shli@kernel.org>
Date: 2017-09-01 05:09:45
Subsystem: block layer, the rest · Maintainers: Jens Axboe, Linus Torvalds

From: Shaohua Li <redacted>

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 <redacted>
Reviewed-by: Ming Lei <redacted>
Signed-off-by: Shaohua Li <redacted>
---
 drivers/block/loop.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f6c204f6..9eff4d3 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.
-- 
2.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help