]> git.itanic.dy.fi Git - linux-stable/commit
null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS
authorChristoph Hellwig <hch@lst.de>
Wed, 27 Dec 2023 09:23:02 +0000 (09:23 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 27 Dec 2023 17:46:01 +0000 (10:46 -0700)
commit9a9525de865410047fa962867b4fcd33943b206f
treeaad91c4f17b8e23c3f81be01ca2fcbeb75c96018
parent34c7db44b4edccda315edcf02b9669aa173e090b
null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS

null_blk has some rather odd capping of the max_hw_sectors value to
BLK_DEF_MAX_SECTORS, which doesn't make sense - max_hw_sector is the
hardware limit, and BLK_DEF_MAX_SECTORS despite the confusing name is the
default cap for the max_sectors field used for normal file system I/O.

Remove all the capping, and simply leave it to the block layer or
user to take up or not all of that for file system I/O.

Fixes: ea17fd354ca8 ("null_blk: Allow controlling max_hw_sectors limit")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20231227092305.279567-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk/main.c