Skip to content

Commit e559ee0

Browse files
Christoph Hellwigaxboe
authored andcommitted
btrfs: validate queue limits
Call blk_validate_limits on the queue limits used for zone append splitting so that calculated values get filled in and any stacking conflicts get cought. Without this there isn't a max_zone_append_sectors limits as of commit 559218d ("block: pre-calculate max_zone_append_sectors"). Fixes: 559218d ("block: pre-calculate max_zone_append_sectors") Reported-by: Yi Zhang <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 470d2bc commit e559ee0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/btrfs/zoned.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,12 @@ int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info)
711711
blk_stack_limits(lim, bdev_limits(device->bdev), 0);
712712
}
713713

714+
ret = blk_validate_limits(lim);
715+
if (ret) {
716+
btrfs_err(fs_info, "zoned: failed to validate queue limits");
717+
return ret;
718+
}
719+
714720
/*
715721
* stripe_size is always aligned to BTRFS_STRIPE_LEN in
716722
* btrfs_create_chunk(). Since we want stripe_len == zone_size,

0 commit comments

Comments
 (0)