The filestreams allocator can only be selected for files that reside on
the data volume. In commit
ee3e0010, we sprinkled calls to
_require_no_rtinherit in the filestreams tests so that there wouldn't be
regressions reported if the filesystem is formatted with -d rtinherit=1.
This unnecessarily limits test coverage because userspace can control
the device selection parameters quite easily with xfs_io chattr. Make
the filestreams tests unset SCRATCH_RTDEV so that the allocator isn't
thrown off by the rtbitmap consuming space on the data device.
Fixes: ee3e0010 ("xfs/realtime: add _require_no_rtinherit function")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
local use_directio="$7"
local expected_result="$8" # "fail" if failure is expected
+ # Disable the scratch rt device to avoid test failures relating to the
+ # rt bitmap consuming free space in our small data device and throwing
+ # off the filestreams allocator.
+ unset SCRATCH_RTDEV
+
local size=`expr $agsize \* 1024 \* 1024 \* $agcount`
_scratch_mkfs_xfs -dsize=$size,agcount=$agcount >/dev/null 2>&1 \
|| _fail "mkfs failed"
_supported_fs xfs
_require_scratch
-_require_no_rtinherit
_check_filestreams_support || _notrun "filestreams not available"
_supported_fs xfs
_require_scratch
-_require_no_rtinherit
_check_filestreams_support || _notrun "filestreams not available"
_supported_fs xfs
_require_scratch
-_require_no_rtinherit
_check_filestreams_support || _notrun "filestreams not available"
_supported_fs xfs
_require_scratch
-_require_no_rtinherit
_check_filestreams_support || _notrun "filestreams not available"
_supported_fs xfs
_require_scratch
-_require_no_rtinherit
_check_filestreams_support || _notrun "filestreams not available"
# check for filestreams
_check_filestreams_support || _notrun "filestreams not available"
+# Disable the scratch rt device to avoid test failures relating to the rt
+# bitmap consuming free space in our small data device and throwing off the
+# filestreams allocator.
+unset SCRATCH_RTDEV
+
# use small AGs for frequent stream switching
_scratch_mkfs_xfs -d agsize=20m,size=2g >> $seqres.full 2>&1 ||
_fail "mkfs failed"