summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-12-27 12:23:04 +0300
committerJens Axboe <axboe@kernel.dk>2023-12-27 20:46:01 +0300
commit3d77976c3a8586ab1fb6845e2061588b7d04934f (patch)
tree597c695905e147cbe9b813e683c344a96514ffc2 /drivers/block
parent3888b2ee6262616dbcbf902bc171963fe345da87 (diff)
downloadlinux-3d77976c3a8586ab1fb6845e2061588b7d04934f.tar.xz
loop: don't abuse BLK_DEF_MAX_SECTORS
BLK_DEF_MAX_SECTORS despite the confusing name is the default cap for the max_sectors limits. Don't use it to initialize max_hw_setors, which is a hardware / driver capacility. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20231227092305.279567-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/loop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 23bc8b0fc23c..2bd10f3bfcb2 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2036,7 +2036,8 @@ 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);
+ /* random number picked from the history block max_sectors cap */
+ blk_queue_max_hw_sectors(lo->lo_queue, 2560u);
/*
* By default, we do buffer IO, so it doesn't make sense to enable