]> www.infradead.org Git - users/jedix/linux-maple.git/commit
block: Validate logical block size in blk_validate_limits()
authorJohn Garry <john.g.garry@oracle.com>
Mon, 8 Jul 2024 09:16:48 +0000 (09:16 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Jul 2024 06:00:17 +0000 (00:00 -0600)
commitfe3d508ba95bc63adba661355115be340275c0d1
tree3bdc8d5d24f1457da73ae129de10f455ee2e9aa2
parent4ff3d01275dee10ed1f40c314ba5133e3c7a6e1b
block: Validate logical block size in blk_validate_limits()

Some drivers validate that their own logical block size. It is no harm to
always do this, so validate in blk_validate_limits().

This allows us to remove the validation in most of those drivers.

Add a comment to blk_validate_block_size() to inform users that self-
validation of LBS is usually unnecessary.

Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240708091651.177447-3-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-settings.c
include/linux/blkdev.h