Skip to content

Commit 3d77976

Browse files
Christoph Hellwigaxboe
authored andcommitted
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>
1 parent 3888b2e commit 3d77976

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/block/loop.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,8 @@ static int loop_add(int i)
20362036
}
20372037
lo->lo_queue = lo->lo_disk->queue;
20382038

2039-
blk_queue_max_hw_sectors(lo->lo_queue, BLK_DEF_MAX_SECTORS);
2039+
/* random number picked from the history block max_sectors cap */
2040+
blk_queue_max_hw_sectors(lo->lo_queue, 2560u);
20402041

20412042
/*
20422043
* By default, we do buffer IO, so it doesn't make sense to enable

0 commit comments

Comments
 (0)