block: don't reject too large max_user_sectors in blk_validate_limits
PATCH 1/1 block: don't reject too large max_user_sectors in blk_validate_limits
We already cap down the actual max_sectors to the max of the hardware and user limit, so don't reject the configuration.
Signed-off-by Christoph Hellwig <[email protected]>
Reviewed-by John Garry <[email protected]>
Reviewed-by Damien Le Moal <[email protected]>
--- block/blk-settings.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
block/blk-settings.c +1 -2
@@ -146,8 +146,7 @@ static int blk_validate_limits(struct queue_limits *lim) max_hw_sectors =min_not_zero (lim->max_hw_sectors, lim->max_dev_sectors);if (lim->max_user_sectors) { -if (lim->max_user_sectors > max_hw_sectors || - lim->max_user_sectors <PAGE_SIZE /SECTOR_SIZE ) +if (lim->max_user_sectors <PAGE_SIZE /SECTOR_SIZE )return -EINVAL ; lim->max_sectors =min (max_hw_sectors, lim->max_user_sectors); }else {
Signature · 1 line
2.39.2
Quoted 4 lines · Christoph Hellwig
We already cap down the actual
max_sectorsto the max of the hardware and user limit, so don't reject the configuration.
Applied, thanks!
[1/1] block: don't reject too large max_user_sectors in blk_validate_limits
commit: 038105a200689ae07eb9e804ca2295e628a45820
Best regards,
Signature · 1 line
Jens Axboe