# Force metadata directories off.
_scratch_xfs_force_no_metadir()
{
- if echo "$MKFS_OPTIONS" | grep -q 'rtgroups='; then
- MKFS_OPTIONS="$(echo "$MKFS_OPTIONS" | sed -e 's/rtgroups=\([01]\)/rtgroups=0/g')"
- fi
-
if echo "$MKFS_OPTIONS" | grep -q 'metadir='; then
MKFS_OPTIONS="$(echo "$MKFS_OPTIONS" | sed -e 's/metadir=\([01]\)/metadir=0/g')"
return
# Does mkfs support rtgroups?
supports_rtgroups()
{
- $MKFS_XFS_PROG 2>&1 | grep -q 'rtgroups='
+ $MKFS_XFS_PROG 2>&1 | grep -q 'metadir='
}
# Do we need to enable rtgroups at mkfs time to support a feature upgrade test?
local caller_options="$MKFS_OPTIONS"
local rtgroups
- need_rtgroups "$feat" && rtgroups=1
- if echo "$caller_options" | grep -q 'rtgroups='; then
+ need_rtgroups "$feat" && metadir=1
+ if echo "$caller_options" | grep -q 'metadir='; then
test -z "$rtgroups" && rtgroups=0
- caller_options="$(echo "$caller_options" | sed -e 's/rtgroups=*[0-9]*/rtgroups='$rtgroups'/g')"
+ caller_options="$(echo "$caller_options" | sed -e 's/metadir=*[0-9]*/metadir='$rtgroups'/g')"
elif [ -n "$rtgroups" ]; then
- caller_options="$caller_options -r rtgroups=$rtgroups"
+ caller_options="$caller_options -m metadir=$rtgroups"
fi
for feat in "${FEATURES[@]}"; do