]> www.infradead.org Git - users/dwmw2/linux.git/commit
block: export blk_validate_limits
authorChristoph Hellwig <hch@lst.de>
Wed, 13 Nov 2024 08:45:35 +0000 (09:45 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Nov 2024 18:40:11 +0000 (11:40 -0700)
commit470d2bc3a0bc19a849cc7478c02d3f5ecaa1233e
tree6523dd41a70d2d56db768bd7ca7f0eb9e9741d23
parent15da3dd3f5d22328654a690db1f9ed211aaecfd6
block: export blk_validate_limits

While block drivers do the validation as part of committing them to the
queue, users that use the limit outside of a block device context have
to validate the limits and fill in the calculated values as well.

So far btrfs is the only user of queue limits without a block device,
and it has gotten away with that more or less by accident.  But with
commit 559218d43ec9 ("block: pre-calculate max_zone_append_sectors")
this became fatal for setups that have small max zone append size,
as it won't be limited now.

Export blk_validate_limits so that it can be called directly from btrfs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20241113084541.34315-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-settings.c
include/linux/blkdev.h