Re: blk_validate_limits validation of block size (was Re: [PATCH v2] null_blk: fix validation of block size)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/07/2024 14:19, Christoph Hellwig wrote:
On Wed, Jul 03, 2024 at 01:20:26PM +0100, John Garry wrote:
So if we stop validating the limits in a., there is a user-visible change in
behaviour (as we stop rejecting invalid limits from the NBD_SET_BLKSIZE
ioctl).

We could add a "dryrun" option to queue_limits_commit_update() (and call
that instead of blk_validate_block_size(), which is effectively the same as
calling blk_validate_block_size()). Or we can keep
nbd as the only blk_validate_limits() user (outside the block layer).
I'd just keep the extra external blk_validate_block_size call in nbd.c.

Maybe add a comment to the blk_validate_block_size declaration that
drivers should not bother with it as it's already done by
blk_validate_limits.

ok, fine. It's a bit unfortunate that blk_validate_block_size() won't be internal to the block layer.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux