mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-31 09:51:38 +00:00
btrfs-progs: pass in block-group type to zoned_profile_supported
Pass BTRFS_BLOCK_GROUP_DATA and BTRFS_BLOCK_GROUP_METADATA to zoned_profile_supported(), so we can actually distinguish if it is a data or a meta-data block group. Fixes: 8f914d518a46 ("btrfs-progs: zoned support DUP on metadata block groups") Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
532bf58b5b
commit
89191f8c12
@ -118,7 +118,7 @@ static inline bool btrfs_dev_is_empty_zone(struct btrfs_device *device, u64 pos)
|
||||
return zinfo->zones[zno].cond == BLK_ZONE_COND_EMPTY;
|
||||
}
|
||||
|
||||
bool zoned_profile_supported(u64 flags);
|
||||
bool zoned_profile_supported(u64 map_type);
|
||||
int btrfs_reset_dev_zone(int fd, struct blk_zone *zone);
|
||||
u64 btrfs_find_allocatable_zones(struct btrfs_device *device, u64 hole_start,
|
||||
u64 hole_end, u64 num_bytes);
|
||||
|
@ -1349,8 +1349,8 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
if (zoned && (!zoned_profile_supported(metadata_profile) ||
|
||||
!zoned_profile_supported(data_profile))) {
|
||||
if (zoned && (!zoned_profile_supported(BTRFS_BLOCK_GROUP_METADATA | metadata_profile) ||
|
||||
!zoned_profile_supported(BTRFS_BLOCK_GROUP_DATA | data_profile))) {
|
||||
error("zoned mode does not yet support RAID/DUP profiles, please specify '-d single -m single' manually");
|
||||
goto error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user