diff options
author | Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> | 2022-02-22 13:19:08 +0900 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2022-03-21 00:38:41 +0800 |
commit | 7fad8609aedb4640b8a09162a630f1a10707228e (patch) | |
tree | 1037d7a4f3104b3d55d9212a43e167b7b064efaa | |
parent | cda30840132ba6e08e367c205cf563e0382d21dc (diff) | |
download | xfstests-dev-7fad8609aedb4640b8a09162a630f1a10707228e.tar.gz |
common/rc: avoid mixed mode for zoned btrfs
When the helper function _scratch_mkfs_sized is called with small
filesystem size and FSTYP=btrfs, it calls mkfs.btrfs with --mixed option
to enable mixed mode. However, mkfs.btrfs with --mixed option fails for
zoned block devices since btrfs does not support mixed mode together
with zoned mode. To avoid this failure, do not set --mixed option when
the scratch device is a zoned block device.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rw-r--r-- | common/rc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1078,10 +1078,10 @@ _scratch_mkfs_sized() ;; btrfs) local mixed_opt= - # minimum size that's needed without the mixed option. - # Ref: btrfs-prog: btrfs_min_dev_size() - # Non mixed mode is also the default option. - (( fssize < $((256 * 1024 *1024)) )) && mixed_opt='--mixed' + # Mixed option is required when the filesystem size is small and + # the device is not zoned. Ref: btrfs-progs: btrfs_min_dev_size() + (( fssize < $((256 * 1024 * 1024)) )) && + ! _scratch_btrfs_is_zoned && mixed_opt='--mixed' $MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV ;; jfs) |