@@ -1871,3 +1871,16 @@ _scratch_xfs_find_metafile()
echo "${selector}"
return 0
}
+
+# Force metadata directories off.
+_scratch_xfs_force_no_metadir()
+{
+ if echo "$MKFS_OPTIONS" | grep -q 'metadir='; then
+ MKFS_OPTIONS="$(echo "$MKFS_OPTIONS" | sed -e 's/metadir=\([01]\)/metadir=0/g')"
+ return
+ fi
+
+ if grep -q 'metadir=' $MKFS_XFS_PROG; then
+ MKFS_OPTIONS="-m metadir=0 $MKFS_OPTIONS"
+ fi
+}
@@ -50,6 +50,7 @@ _supported_fs xfs
_require_scratch
_require_no_large_scratch_dev
+_scratch_xfs_force_no_metadir
DSIZE="-dsize=100m,agcount=6"
@@ -53,6 +53,7 @@ _supported_fs xfs
_require_scratch
_require_no_large_scratch_dev
+_scratch_xfs_force_no_metadir
# devzero blows away 512byte blocks, so make 512byte inodes (at least)
_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
@@ -52,6 +52,7 @@ _supported_fs xfs
# fix filesystem, new mkfs.xfs will be fine.
_require_scratch
+_scratch_xfs_force_no_metadir
_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed!"