mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-24 12:44:17 +08:00
btrfs-progs: mkfs: do not set zone size on non-zoned mode
Since zone_size() returns an emulated zone size even for non-zoned device, we cannot use cfg.zone_size to determine the device is zoned or not. Set zone_size = 0 on non-zoned mode. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
b2dc5d0037
commit
c9c36aaf5b
@ -1357,7 +1357,10 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
|
||||
mkfs_cfg.features = features;
|
||||
mkfs_cfg.runtime_features = runtime_features;
|
||||
mkfs_cfg.csum_type = csum_type;
|
||||
mkfs_cfg.zone_size = zone_size(file);
|
||||
if (zoned)
|
||||
mkfs_cfg.zone_size = zone_size(file);
|
||||
else
|
||||
mkfs_cfg.zone_size = 0;
|
||||
|
||||
ret = make_btrfs(fd, &mkfs_cfg);
|
||||
if (ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user