mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: fix filestreams tests when rtinherit=1
The filestreams allocator can only be selected for files that reside on the data volume. In commitee3e0010, 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>
This commit is contained in:
committed by
Eryu Guan
parent
48aa331f21
commit
acb981a4e5
@@ -90,6 +90,11 @@ _test_streams() {
|
|||||||
local use_directio="$7"
|
local use_directio="$7"
|
||||||
local expected_result="$8" # "fail" if failure is expected
|
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`
|
local size=`expr $agsize \* 1024 \* 1024 \* $agcount`
|
||||||
_scratch_mkfs_xfs -dsize=$size,agcount=$agcount >/dev/null 2>&1 \
|
_scratch_mkfs_xfs -dsize=$size,agcount=$agcount >/dev/null 2>&1 \
|
||||||
|| _fail "mkfs failed"
|
|| _fail "mkfs failed"
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ _cleanup()
|
|||||||
_supported_fs xfs
|
_supported_fs xfs
|
||||||
|
|
||||||
_require_scratch
|
_require_scratch
|
||||||
_require_no_rtinherit
|
|
||||||
|
|
||||||
_check_filestreams_support || _notrun "filestreams not available"
|
_check_filestreams_support || _notrun "filestreams not available"
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ _cleanup()
|
|||||||
_supported_fs xfs
|
_supported_fs xfs
|
||||||
|
|
||||||
_require_scratch
|
_require_scratch
|
||||||
_require_no_rtinherit
|
|
||||||
|
|
||||||
_check_filestreams_support || _notrun "filestreams not available"
|
_check_filestreams_support || _notrun "filestreams not available"
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ _cleanup()
|
|||||||
_supported_fs xfs
|
_supported_fs xfs
|
||||||
|
|
||||||
_require_scratch
|
_require_scratch
|
||||||
_require_no_rtinherit
|
|
||||||
|
|
||||||
_check_filestreams_support || _notrun "filestreams not available"
|
_check_filestreams_support || _notrun "filestreams not available"
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ _cleanup()
|
|||||||
_supported_fs xfs
|
_supported_fs xfs
|
||||||
|
|
||||||
_require_scratch
|
_require_scratch
|
||||||
_require_no_rtinherit
|
|
||||||
|
|
||||||
_check_filestreams_support || _notrun "filestreams not available"
|
_check_filestreams_support || _notrun "filestreams not available"
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ _cleanup()
|
|||||||
_supported_fs xfs
|
_supported_fs xfs
|
||||||
|
|
||||||
_require_scratch
|
_require_scratch
|
||||||
_require_no_rtinherit
|
|
||||||
|
|
||||||
_check_filestreams_support || _notrun "filestreams not available"
|
_check_filestreams_support || _notrun "filestreams not available"
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ _require_xfs_io_command "falloc"
|
|||||||
# check for filestreams
|
# check for filestreams
|
||||||
_check_filestreams_support || _notrun "filestreams not available"
|
_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
|
# use small AGs for frequent stream switching
|
||||||
_scratch_mkfs_xfs -d agsize=20m,size=2g >> $seqres.full 2>&1 ||
|
_scratch_mkfs_xfs -d agsize=20m,size=2g >> $seqres.full 2>&1 ||
|
||||||
_fail "mkfs failed"
|
_fail "mkfs failed"
|
||||||
|
|||||||
Reference in New Issue
Block a user