xfs/837: set rtinherit on the root directory programmatically
PATCH 1/1 xfs/837: set rtinherit on the root directory programmatically
From: Darrick J. Wong <[email protected]>
I patched mkfs to enable metadir by default, but then this test regressed on the "-m metadir=0 -d rtinherit=1..." configuration. Upon digging into the test results, I observed that the scratch filesystem actually had metadir enabled despite the intended configuration. That in turn revealed that _scratch_mkfs was failing because -d rtinherit was being respecified, so it did that obnoxious thing it does and reformats with only the caller's mkfs options.
As a result, the scratch filesystem is configured incorrectly -- metadir is enabled when we don't want it to be, so we pick the wrong output file and fail.
Instead of passing -drtinherit and potentially conflicting with the test configuration options, let's use _xfs_force_bdev to set rtinherit programmatically.
--- tests/xfs/837 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tests/xfs/837 +5 -1
@@ -35,7 +35,11 @@ fi _register_cleanup "_cleanup_setrw" -_scratch_mkfs "-d rtinherit" > /dev/null 2>&1 +_scratch_mkfs > /dev/null 2>&1 + +_scratch_mount +_xfs_force_bdev realtime $SCRATCH_MNT +_scratch_unmount # Select appropriate output file features=""
Quoted 18 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
I patched mkfs to enable metadir by default, but then this test regressed on the "-m metadir=0 -d rtinherit=1..." configuration. Upon digging into the test results, I observed that the scratch filesystem actually had metadir enabled despite the intended configuration. That in turn revealed that
_scratch_mkfswas failing because -d rtinherit was being respecified, so it did that obnoxious thing it does and reformats with only the caller's mkfs options.As a result, the scratch filesystem is configured incorrectly -- metadir is enabled when we don't want it to be, so we pick the wrong output file and fail.
Instead of passing -drtinherit and potentially conflicting with the test configuration options, let's use
_xfs_force_bdevto set rtinherit programmatically.
Quoted 5 lines
Cc <[email protected]>Cc <[email protected]> # v2025.06.22Fixes e225772353e212 ("xfs: add mount test for read only rt devices")Signed-off-by "Darrick J. Wong" <[email protected]>---
Makes sense to me,
Quoted 20 lines
tests/xfs/837 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)tests/xfs/837 +5
-1@@ -35,7 +35,11 @@ fi _register_cleanup "_cleanup_setrw" -_scratch_mkfs "-d rtinherit" > /dev/null 2>&1 +_scratch_mkfs > /dev/null 2>&1 + +_scratch_mount +_xfs_force_bdev realtime $SCRATCH_MNT +_scratch_unmount # Select appropriate output file features=""
Quoted 34 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
I patched mkfs to enable metadir by default, but then this test regressed on the "-m metadir=0 -d rtinherit=1..." configuration. Upon digging into the test results, I observed that the scratch filesystem actually had metadir enabled despite the intended configuration. That in turn revealed that
_scratch_mkfswas failing because -d rtinherit was being respecified, so it did that obnoxious thing it does and reformats with only the caller's mkfs options.As a result, the scratch filesystem is configured incorrectly -- metadir is enabled when we don't want it to be, so we pick the wrong output file and fail.
Instead of passing -drtinherit and potentially conflicting with the test configuration options, let's use
_xfs_force_bdevto set rtinherit programmatically.Cc <[email protected]>Cc <[email protected]> # v2025.06.22Fixes e225772353e212 ("xfs: add mount test for read only rt devices")Signed-off-by "Darrick J. Wong" <[email protected]>--- tests/xfs/837 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)tests/xfs/837 +0
-0@@ -35,7 +35,11 @@ fi _register_cleanup "_cleanup_setrw"
tests/xfs/837 fi · line 45
Quoted 10 lines
tests/xfs/837 +5
-1-_scratch_mkfs "-d rtinherit" > /dev/null 2>&1 +_scratch_mkfs > /dev/null 2>&1 + +_scratch_mount +_xfs_force_bdev realtime $SCRATCH_MNT +_scratch_unmount # Select appropriate output file features=""
Looks good to me!