Hi,
在 2023/12/26 17:14, Christoph Hellwig 写道:
BLK_DEF_MAX_SECTORS is (as the name implies) already the default.
Looks like this not true. From blk_set_default_limits():
lim->max_sectors = lim->max_hw_sectors = BLK_SAFE_MAX_SECTORS;
So, the default is not BLK_DEF_MAX_SECTORS. Or am I missing something?
Thanks,
Kuai
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
drivers/block/loop.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 5bc2b4fcfa772d..371a318e691d02 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2038,8 +2038,6 @@ static int loop_add(int i)
}
lo->lo_queue = lo->lo_disk->queue;
- blk_queue_max_hw_sectors(lo->lo_queue, BLK_DEF_MAX_SECTORS);
-
/*
* By default, we do buffer IO, so it doesn't make sense to enable
* merge because the I/O submitted to backing file is handled page by