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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:29 +0000 (15:35 -0800)
commiteeeb228c5f23802fdccf08edb41ff5688dd71a14
tree9077cd97a16d2b7b945e3e0e53a85d7389cffcf8
parent0f37a5c9d3666a66649508ccec1aed95a54510bc
null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS

[ Upstream commit 9a9525de865410047fa962867b4fcd33943b206f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/null_blk/main.c