* [PATCHSET] fstests: more random fixes for v2026.01.27
@ 2026-02-02 19:11 Darrick J. Wong
2026-02-02 19:11 ` [PATCH 1/3] xfs/018: remove inline xattr recovery tests Darrick J. Wong
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Darrick J. Wong @ 2026-02-02 19:11 UTC (permalink / raw)
To: djwong, zlang; +Cc: fstests, linux-ext4, fstests
Hi all,
Here's the usual odd fixes for fstests.
If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.
With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=random-fixes
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=random-fixes
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=random-fixes
---
Commits in this patchset:
* xfs/018: remove inline xattr recovery tests
* xfs/620: force xattr leaf format for this test
* generic/749: don't write a ton of _mread output to seqres.full
---
tests/generic/749 | 11 ++++++++---
tests/xfs/018 | 24 ------------------------
tests/xfs/018.out | 45 ---------------------------------------------
tests/xfs/620 | 7 +++++--
4 files changed, 13 insertions(+), 74 deletions(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/3] xfs/018: remove inline xattr recovery tests
2026-02-02 19:11 [PATCHSET] fstests: more random fixes for v2026.01.27 Darrick J. Wong
@ 2026-02-02 19:11 ` Darrick J. Wong
2026-02-03 5:22 ` Christoph Hellwig
2026-02-06 21:54 ` [PATCH v1.1 " Darrick J. Wong
2026-02-02 19:11 ` [PATCH 2/3] xfs/620: force xattr leaf format for this test Darrick J. Wong
2026-02-02 19:11 ` [PATCH 3/3] generic/749: don't write a ton of _mread output to seqres.full Darrick J. Wong
2 siblings, 2 replies; 16+ messages in thread
From: Darrick J. Wong @ 2026-02-02 19:11 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-ext4, fstests
From: Darrick J. Wong <djwong@kernel.org>
Now that we can do xattr updates in a single transaction (as opposed to
using the attr intent machinery) if we keep the attr structure in short
format, remove the attr intent item log recovery tests.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/xfs/018 | 24 ------------------------
tests/xfs/018.out | 45 ---------------------------------------------
2 files changed, 69 deletions(-)
diff --git a/tests/xfs/018 b/tests/xfs/018
index 8b6a3e1c508045..9b69c9cb14b33d 100755
--- a/tests/xfs/018
+++ b/tests/xfs/018
@@ -127,16 +127,6 @@ mkdir $testdir
require_larp
-# empty, inline
-create_test_file empty_file1 0
-test_attr_replay empty_file1 "attr_name" $attr64 "s" "larp"
-test_attr_replay empty_file1 "attr_name" $attr64 "r" "larp"
-
-# empty, inline with an unaligned value
-create_test_file empty_fileX 0
-test_attr_replay empty_fileX "attr_nameX" $attr17 "s" "larp"
-test_attr_replay empty_fileX "attr_nameX" $attr17 "r" "larp"
-
# empty, internal
create_test_file empty_file2 0
test_attr_replay empty_file2 "attr_name" $attr1k "s" "larp"
@@ -152,16 +142,6 @@ create_test_file empty_fileY 0
test_attr_replay empty_fileY "attr_name" $attr32l "s" "larp"
test_attr_replay empty_fileY "attr_name" $attr32l "r" "larp"
-# inline, inline
-create_test_file inline_file1 1 $attr16
-test_attr_replay inline_file1 "attr_name2" $attr64 "s" "larp"
-test_attr_replay inline_file1 "attr_name2" $attr64 "r" "larp"
-
-# inline, internal
-create_test_file inline_file2 1 $attr16
-test_attr_replay inline_file2 "attr_name2" $attr1k "s" "larp"
-test_attr_replay inline_file2 "attr_name2" $attr1k "r" "larp"
-
# inline, remote
create_test_file inline_file3 1 $attr16
test_attr_replay inline_file3 "attr_name2" $attr64k "s" "larp"
@@ -195,10 +175,6 @@ create_test_file remote_file2 1 $attr64k
test_attr_replay remote_file2 "attr_name2" $attr64k "s" "larp"
test_attr_replay remote_file2 "attr_name2" $attr64k "r" "larp"
-# replace shortform with different value
-create_test_file sf_file 2 $attr64
-test_attr_replay sf_file "attr_name2" $attr16 "s" "larp"
-
# replace leaf with different value
create_test_file leaf_file 3 $attr1k
test_attr_replay leaf_file "attr_name2" $attr256 "s" "larp"
diff --git a/tests/xfs/018.out b/tests/xfs/018.out
index ad8fd5266f06d0..be1d6422af65a5 100644
--- a/tests/xfs/018.out
+++ b/tests/xfs/018.out
@@ -1,26 +1,6 @@
QA output created by 018
*** mkfs
*** mount FS
-attr_set: Input/output error
-Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file1
-touch: cannot touch 'SCRATCH_MNT/testdir/empty_file1': Input/output error
-attr_name: e889d82dd111d6315d7b1edce2b1b30f -
-
-attr_remove: Input/output error
-Could not remove "attr_name" for SCRATCH_MNT/testdir/empty_file1
-touch: cannot touch 'SCRATCH_MNT/testdir/empty_file1': Input/output error
-attr_name: d41d8cd98f00b204e9800998ecf8427e -
-
-attr_set: Input/output error
-Could not set "attr_nameX" for SCRATCH_MNT/testdir/empty_fileX
-touch: cannot touch 'SCRATCH_MNT/testdir/empty_fileX': Input/output error
-attr_nameX: cb72c43fb97dd3cb4ac6ad2d9bd365e1 -
-
-attr_remove: Input/output error
-Could not remove "attr_nameX" for SCRATCH_MNT/testdir/empty_fileX
-touch: cannot touch 'SCRATCH_MNT/testdir/empty_fileX': Input/output error
-attr_nameX: d41d8cd98f00b204e9800998ecf8427e -
-
attr_set: Input/output error
Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file2
touch: cannot touch 'SCRATCH_MNT/testdir/empty_file2': Input/output error
@@ -51,26 +31,6 @@ Could not remove "attr_name" for SCRATCH_MNT/testdir/empty_fileY
touch: cannot touch 'SCRATCH_MNT/testdir/empty_fileY': Input/output error
attr_name: d41d8cd98f00b204e9800998ecf8427e -
-attr_set: Input/output error
-Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file1
-touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
-attr_name2: e889d82dd111d6315d7b1edce2b1b30f -
-
-attr_remove: Input/output error
-Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file1
-touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
-attr_name2: d41d8cd98f00b204e9800998ecf8427e -
-
-attr_set: Input/output error
-Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file2
-touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
-attr_name2: 4198214ee02e6ad7ac39559cd3e70070 -
-
-attr_remove: Input/output error
-Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file2
-touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
-attr_name2: d41d8cd98f00b204e9800998ecf8427e -
-
attr_set: Input/output error
Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file3
touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output error
@@ -131,11 +91,6 @@ Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file2
touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output error
attr_name2: d41d8cd98f00b204e9800998ecf8427e -
-attr_set: Input/output error
-Could not set "attr_name2" for SCRATCH_MNT/testdir/sf_file
-touch: cannot touch 'SCRATCH_MNT/testdir/sf_file': Input/output error
-attr_name2: e43df9b5a46b755ea8f1b4dd08265544 -
-
attr_set: Input/output error
Could not set "attr_name2" for SCRATCH_MNT/testdir/leaf_file
touch: cannot touch 'SCRATCH_MNT/testdir/leaf_file': Input/output error
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/3] xfs/620: force xattr leaf format for this test
2026-02-02 19:11 [PATCHSET] fstests: more random fixes for v2026.01.27 Darrick J. Wong
2026-02-02 19:11 ` [PATCH 1/3] xfs/018: remove inline xattr recovery tests Darrick J. Wong
@ 2026-02-02 19:11 ` Darrick J. Wong
2026-02-03 5:22 ` Christoph Hellwig
2026-02-05 17:15 ` Carlos Maiolino
2026-02-02 19:11 ` [PATCH 3/3] generic/749: don't write a ton of _mread output to seqres.full Darrick J. Wong
2 siblings, 2 replies; 16+ messages in thread
From: Darrick J. Wong @ 2026-02-02 19:11 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-ext4, fstests
From: Darrick J. Wong <djwong@kernel.org>
Now that the kernel's parent pointer update code skips the attr intent
mechanism when the attr fork is in local/shortform format, we need to
bloat the attr fork to force the slow path for error injection testing.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/xfs/620 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/xfs/620 b/tests/xfs/620
index 42a30630f50ac0..47e042b937eb9c 100755
--- a/tests/xfs/620
+++ b/tests/xfs/620
@@ -55,8 +55,11 @@ file5="file5"
echo ""
-# Create files
-touch $SCRATCH_MNT/$testfolder1/$file4
+# Create a file with a 53k xattr to force the attr structure out of short
+# format. Parent pointer operations on a shortform attr structure can skip the
+# attr intent mechanism and therefore do not trigger the larp knob.
+truncate -s 53535 $SCRATCH_MNT/$testfolder1/$file4
+$ATTR_PROG -s x $SCRATCH_MNT/$testfolder1/$file4 < $SCRATCH_MNT/$testfolder1/$file4 &>/dev/null
_xfs_verify_parent "$testfolder1" "$file4" "$testfolder1/$file4"
# Inject error
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/3] generic/749: don't write a ton of _mread output to seqres.full
2026-02-02 19:11 [PATCHSET] fstests: more random fixes for v2026.01.27 Darrick J. Wong
2026-02-02 19:11 ` [PATCH 1/3] xfs/018: remove inline xattr recovery tests Darrick J. Wong
2026-02-02 19:11 ` [PATCH 2/3] xfs/620: force xattr leaf format for this test Darrick J. Wong
@ 2026-02-02 19:11 ` Darrick J. Wong
2026-02-03 5:23 ` Christoph Hellwig
2026-02-05 17:17 ` Carlos Maiolino
2 siblings, 2 replies; 16+ messages in thread
From: Darrick J. Wong @ 2026-02-02 19:11 UTC (permalink / raw)
To: djwong, zlang; +Cc: fstests, linux-ext4, fstests
From: Darrick J. Wong <djwong@kernel.org>
Something went wrong with this test when testing with fuse4fs, but I
couldn't tell what because this test writes so much data to seqres.full
that it completely filled the log partition. Most of that output was
from checks that actually succeeded, so let's reduce the amount of
logging from _mread (which passes -v) by writing to a tempfile and only
dumping the output to the .full file if something breaks.
Cc: <fstests@vger.kernel.org> # v2024.06.27
Fixes: e4a6b119e52295 ("fstests: add mmap page boundary tests")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/generic/749 | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tests/generic/749 b/tests/generic/749
index 7af019ddd7f98f..01e3eac0ff73be 100755
--- a/tests/generic/749
+++ b/tests/generic/749
@@ -163,17 +163,20 @@ do_mmap_tests()
new_filelen=$(_get_filesize $test_file)
map_len=$(_round_up_to_page_boundary $new_filelen)
csum_orig="$(_md5_checksum $test_file)"
- _mread $test_file 0 $map_len >> $seqres.full 2>$tmp.err
+ _mread $test_file 0 $map_len > $tmp.out 2>$tmp.err
if grep -q 'Bus error' $tmp.err; then
failed=1
+ cat $tmp.out >> $seqres.full
cat $tmp.err
echo "Not expecting SIGBUS when reading up to page boundary"
fi
# This should just work
- _mread $test_file 0 $map_len >> $seqres.full 2>$tmp.err
+ _mread $test_file 0 $map_len > $tmp.out 2>$tmp.err
if [[ $? -ne 0 ]]; then
let failed=$failed+1
+ cat $tmp.out >> $seqres.full
+ cat $tmp.err
echo "mmap() read up to page boundary should work"
fi
@@ -205,9 +208,11 @@ do_mmap_tests()
fi
# Now let's go beyond the allowed mmap() page boundary
- _mread $test_file 0 $((map_len + 10)) $((map_len + 10)) >> $seqres.full 2>$tmp.err
+ _mread $test_file 0 $((map_len + 10)) $((map_len + 10)) > $tmp.out 2>$tmp.err
if ! grep -q 'Bus error' $tmp.err; then
let failed=$failed+1
+ cat $tmp.out >> $seqres.full
+ cat $tmp.err
echo "Expected SIGBUS when mmap() reading beyond page boundary"
fi
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] xfs/018: remove inline xattr recovery tests
2026-02-02 19:11 ` [PATCH 1/3] xfs/018: remove inline xattr recovery tests Darrick J. Wong
@ 2026-02-03 5:22 ` Christoph Hellwig
2026-02-05 16:56 ` Darrick J. Wong
2026-02-06 21:54 ` [PATCH v1.1 " Darrick J. Wong
1 sibling, 1 reply; 16+ messages in thread
From: Christoph Hellwig @ 2026-02-03 5:22 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-ext4, fstests
On Mon, Feb 02, 2026 at 11:11:12AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Now that we can do xattr updates in a single transaction (as opposed to
> using the attr intent machinery) if we keep the attr structure in short
> format, remove the attr intent item log recovery tests.
I have a bit of a hard time parsing this. Currently with xfs/for-next
these fail, so removing them fixes it, which is probably what drove
this.
But looking through the patches I'm not sure why they actually are
failing - the updates are logged as part of the inode item, and
nothing in test_attr_replay seems to actually look at log specific
bits?
Only vaguely related, but should we ensure to always clear error
tags after the test runs to ensure they don't leak into other tests?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] xfs/620: force xattr leaf format for this test
2026-02-02 19:11 ` [PATCH 2/3] xfs/620: force xattr leaf format for this test Darrick J. Wong
@ 2026-02-03 5:22 ` Christoph Hellwig
2026-02-05 17:15 ` Carlos Maiolino
1 sibling, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2026-02-03 5:22 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-ext4, fstests
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] generic/749: don't write a ton of _mread output to seqres.full
2026-02-02 19:11 ` [PATCH 3/3] generic/749: don't write a ton of _mread output to seqres.full Darrick J. Wong
@ 2026-02-03 5:23 ` Christoph Hellwig
2026-02-05 17:17 ` Carlos Maiolino
1 sibling, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2026-02-03 5:23 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, fstests, linux-ext4
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] xfs/018: remove inline xattr recovery tests
2026-02-03 5:22 ` Christoph Hellwig
@ 2026-02-05 16:56 ` Darrick J. Wong
2026-02-05 17:19 ` Carlos Maiolino
2026-02-06 5:59 ` Christoph Hellwig
0 siblings, 2 replies; 16+ messages in thread
From: Darrick J. Wong @ 2026-02-05 16:56 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: zlang, linux-ext4, fstests
On Mon, Feb 02, 2026 at 09:22:36PM -0800, Christoph Hellwig wrote:
> On Mon, Feb 02, 2026 at 11:11:12AM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Now that we can do xattr updates in a single transaction (as opposed to
> > using the attr intent machinery) if we keep the attr structure in short
> > format, remove the attr intent item log recovery tests.
>
> I have a bit of a hard time parsing this. Currently with xfs/for-next
> these fail, so removing them fixes it, which is probably what drove
> this.
Yep.
> But looking through the patches I'm not sure why they actually are
> failing - the updates are logged as part of the inode item, and
> nothing in test_attr_replay seems to actually look at log specific
> bits?
I've rewritten the commit message; does this help?
"In Linux 7.0 we've changed the extended attribute update code to try to
take a shortcut for performance reasons. Before walking through the
attr intent state machine (slow), the update will check to see if the
attr structure is in short format and will stay in that format after the
change. If so, then the incore inode can be updated and logged, and the
update is complete (fast) in a single transaction.
"(Obviously, for complex attr structures or large changes we still walk
through the intent machinery.)
"However, xfs/018 tests the behavior of the "larp" error injector, which
only triggers from inside the attr intent state machine. Therefore, the
short format tests don't actually trip the injector. It makes no sense
to add a new larp injection callsite for the shortcut because either the
single transaction gets written to disk or it doesn't."
> Only vaguely related, but should we ensure to always clear error
> tags after the test runs to ensure they don't leak into other tests?
They go away with _scratch_remount because error tags only live as long
as the mount.
--D
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] xfs/620: force xattr leaf format for this test
2026-02-02 19:11 ` [PATCH 2/3] xfs/620: force xattr leaf format for this test Darrick J. Wong
2026-02-03 5:22 ` Christoph Hellwig
@ 2026-02-05 17:15 ` Carlos Maiolino
1 sibling, 0 replies; 16+ messages in thread
From: Carlos Maiolino @ 2026-02-05 17:15 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-ext4, fstests
On Mon, Feb 02, 2026 at 11:11:28AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Now that the kernel's parent pointer update code skips the attr intent
> mechanism when the attr fork is in local/shortform format, we need to
> bloat the attr fork to force the slow path for error injection testing.
>
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
> tests/xfs/620 | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
>
> diff --git a/tests/xfs/620 b/tests/xfs/620
> index 42a30630f50ac0..47e042b937eb9c 100755
> --- a/tests/xfs/620
> +++ b/tests/xfs/620
> @@ -55,8 +55,11 @@ file5="file5"
>
> echo ""
>
> -# Create files
> -touch $SCRATCH_MNT/$testfolder1/$file4
> +# Create a file with a 53k xattr to force the attr structure out of short
> +# format. Parent pointer operations on a shortform attr structure can skip the
> +# attr intent mechanism and therefore do not trigger the larp knob.
> +truncate -s 53535 $SCRATCH_MNT/$testfolder1/$file4
> +$ATTR_PROG -s x $SCRATCH_MNT/$testfolder1/$file4 < $SCRATCH_MNT/$testfolder1/$file4 &>/dev/null
> _xfs_verify_parent "$testfolder1" "$file4" "$testfolder1/$file4"
>
> # Inject error
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] generic/749: don't write a ton of _mread output to seqres.full
2026-02-02 19:11 ` [PATCH 3/3] generic/749: don't write a ton of _mread output to seqres.full Darrick J. Wong
2026-02-03 5:23 ` Christoph Hellwig
@ 2026-02-05 17:17 ` Carlos Maiolino
1 sibling, 0 replies; 16+ messages in thread
From: Carlos Maiolino @ 2026-02-05 17:17 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, fstests, linux-ext4
On Mon, Feb 02, 2026 at 11:11:44AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Something went wrong with this test when testing with fuse4fs, but I
> couldn't tell what because this test writes so much data to seqres.full
> that it completely filled the log partition. Most of that output was
> from checks that actually succeeded, so let's reduce the amount of
> logging from _mread (which passes -v) by writing to a tempfile and only
> dumping the output to the .full file if something breaks.
>
> Cc: <fstests@vger.kernel.org> # v2024.06.27
> Fixes: e4a6b119e52295 ("fstests: add mmap page boundary tests")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
> tests/generic/749 | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
>
>
> diff --git a/tests/generic/749 b/tests/generic/749
> index 7af019ddd7f98f..01e3eac0ff73be 100755
> --- a/tests/generic/749
> +++ b/tests/generic/749
> @@ -163,17 +163,20 @@ do_mmap_tests()
> new_filelen=$(_get_filesize $test_file)
> map_len=$(_round_up_to_page_boundary $new_filelen)
> csum_orig="$(_md5_checksum $test_file)"
> - _mread $test_file 0 $map_len >> $seqres.full 2>$tmp.err
> + _mread $test_file 0 $map_len > $tmp.out 2>$tmp.err
> if grep -q 'Bus error' $tmp.err; then
> failed=1
> + cat $tmp.out >> $seqres.full
> cat $tmp.err
> echo "Not expecting SIGBUS when reading up to page boundary"
> fi
>
> # This should just work
> - _mread $test_file 0 $map_len >> $seqres.full 2>$tmp.err
> + _mread $test_file 0 $map_len > $tmp.out 2>$tmp.err
> if [[ $? -ne 0 ]]; then
> let failed=$failed+1
> + cat $tmp.out >> $seqres.full
> + cat $tmp.err
> echo "mmap() read up to page boundary should work"
> fi
>
> @@ -205,9 +208,11 @@ do_mmap_tests()
> fi
>
> # Now let's go beyond the allowed mmap() page boundary
> - _mread $test_file 0 $((map_len + 10)) $((map_len + 10)) >> $seqres.full 2>$tmp.err
> + _mread $test_file 0 $((map_len + 10)) $((map_len + 10)) > $tmp.out 2>$tmp.err
> if ! grep -q 'Bus error' $tmp.err; then
> let failed=$failed+1
> + cat $tmp.out >> $seqres.full
> + cat $tmp.err
> echo "Expected SIGBUS when mmap() reading beyond page boundary"
> fi
>
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] xfs/018: remove inline xattr recovery tests
2026-02-05 16:56 ` Darrick J. Wong
@ 2026-02-05 17:19 ` Carlos Maiolino
2026-02-06 5:59 ` Christoph Hellwig
1 sibling, 0 replies; 16+ messages in thread
From: Carlos Maiolino @ 2026-02-05 17:19 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, zlang, linux-ext4, fstests
On Thu, Feb 05, 2026 at 08:56:24AM -0800, Darrick J. Wong wrote:
> On Mon, Feb 02, 2026 at 09:22:36PM -0800, Christoph Hellwig wrote:
> > On Mon, Feb 02, 2026 at 11:11:12AM -0800, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <djwong@kernel.org>
> > >
FWIW, this fix the regressions I'm hitting on 7.0 merge window queue.
> > > Now that we can do xattr updates in a single transaction (as opposed to
> > > using the attr intent machinery) if we keep the attr structure in short
> > > format, remove the attr intent item log recovery tests.
> >
> > I have a bit of a hard time parsing this. Currently with xfs/for-next
> > these fail, so removing them fixes it, which is probably what drove
> > this.
>
> Yep.
>
> > But looking through the patches I'm not sure why they actually are
> > failing - the updates are logged as part of the inode item, and
> > nothing in test_attr_replay seems to actually look at log specific
> > bits?
>
> I've rewritten the commit message; does this help?
>
> "In Linux 7.0 we've changed the extended attribute update code to try to
> take a shortcut for performance reasons. Before walking through the
> attr intent state machine (slow), the update will check to see if the
> attr structure is in short format and will stay in that format after the
> change. If so, then the incore inode can be updated and logged, and the
> update is complete (fast) in a single transaction.
>
> "(Obviously, for complex attr structures or large changes we still walk
> through the intent machinery.)
>
> "However, xfs/018 tests the behavior of the "larp" error injector, which
> only triggers from inside the attr intent state machine. Therefore, the
> short format tests don't actually trip the injector. It makes no sense
> to add a new larp injection callsite for the shortcut because either the
> single transaction gets written to disk or it doesn't."
>
> > Only vaguely related, but should we ensure to always clear error
> > tags after the test runs to ensure they don't leak into other tests?
>
> They go away with _scratch_remount because error tags only live as long
> as the mount.
The changes looks good to me, if you re-send this, feel free to add:
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
>
> --D
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] xfs/018: remove inline xattr recovery tests
2026-02-05 16:56 ` Darrick J. Wong
2026-02-05 17:19 ` Carlos Maiolino
@ 2026-02-06 5:59 ` Christoph Hellwig
2026-02-06 6:22 ` Darrick J. Wong
1 sibling, 1 reply; 16+ messages in thread
From: Christoph Hellwig @ 2026-02-06 5:59 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, zlang, linux-ext4, fstests
On Thu, Feb 05, 2026 at 08:56:24AM -0800, Darrick J. Wong wrote:
> "In Linux 7.0 we've changed the extended attribute update code to try to
> take a shortcut for performance reasons. Before walking through the
> attr intent state machine (slow), the update will check to see if the
> attr structure is in short format and will stay in that format after the
> change. If so, then the incore inode can be updated and logged, and the
> update is complete (fast) in a single transaction.
>
> "(Obviously, for complex attr structures or large changes we still walk
> through the intent machinery.)
>
> "However, xfs/018 tests the behavior of the "larp" error injector, which
> only triggers from inside the attr intent state machine. Therefore, the
> short format tests don't actually trip the injector. It makes no sense
> to add a new larp injection callsite for the shortcut because either the
> single transaction gets written to disk or it doesn't."
Make sense, but from looking at the test I'm still a bit confused
why it fails (vs just not testing something too useful)
>
> > Only vaguely related, but should we ensure to always clear error
> > tags after the test runs to ensure they don't leak into other tests?
>
> They go away with _scratch_remount because error tags only live as long
> as the mount.
True. While still leaves me puzzled why generic/753 now hits attr log
recovery for me sometimes.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] xfs/018: remove inline xattr recovery tests
2026-02-06 5:59 ` Christoph Hellwig
@ 2026-02-06 6:22 ` Darrick J. Wong
2026-02-06 6:26 ` Christoph Hellwig
0 siblings, 1 reply; 16+ messages in thread
From: Darrick J. Wong @ 2026-02-06 6:22 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: zlang, linux-ext4, fstests
On Thu, Feb 05, 2026 at 09:59:42PM -0800, Christoph Hellwig wrote:
> On Thu, Feb 05, 2026 at 08:56:24AM -0800, Darrick J. Wong wrote:
> > "In Linux 7.0 we've changed the extended attribute update code to try to
> > take a shortcut for performance reasons. Before walking through the
> > attr intent state machine (slow), the update will check to see if the
> > attr structure is in short format and will stay in that format after the
> > change. If so, then the incore inode can be updated and logged, and the
> > update is complete (fast) in a single transaction.
> >
> > "(Obviously, for complex attr structures or large changes we still walk
> > through the intent machinery.)
> >
> > "However, xfs/018 tests the behavior of the "larp" error injector, which
> > only triggers from inside the attr intent state machine. Therefore, the
> > short format tests don't actually trip the injector. It makes no sense
> > to add a new larp injection callsite for the shortcut because either the
> > single transaction gets written to disk or it doesn't."
>
> Make sense, but from looking at the test I'm still a bit confused
> why it fails (vs just not testing something too useful)
The golden output no longer matches because the attr update doesn't
return EIO and shut down the filesystem due to the larp injection.
--D
> >
> > > Only vaguely related, but should we ensure to always clear error
> > > tags after the test runs to ensure they don't leak into other tests?
> >
> > They go away with _scratch_remount because error tags only live as long
> > as the mount.
>
> True. While still leaves me puzzled why generic/753 now hits attr log
> recovery for me sometimes.
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] xfs/018: remove inline xattr recovery tests
2026-02-06 6:22 ` Darrick J. Wong
@ 2026-02-06 6:26 ` Christoph Hellwig
2026-02-06 6:27 ` Darrick J. Wong
0 siblings, 1 reply; 16+ messages in thread
From: Christoph Hellwig @ 2026-02-06 6:26 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, zlang, linux-ext4, fstests
On Thu, Feb 05, 2026 at 10:22:22PM -0800, Darrick J. Wong wrote:
> On Thu, Feb 05, 2026 at 09:59:42PM -0800, Christoph Hellwig wrote:
> > On Thu, Feb 05, 2026 at 08:56:24AM -0800, Darrick J. Wong wrote:
> > > "In Linux 7.0 we've changed the extended attribute update code to try to
> > > take a shortcut for performance reasons. Before walking through the
> > > attr intent state machine (slow), the update will check to see if the
> > > attr structure is in short format and will stay in that format after the
> > > change. If so, then the incore inode can be updated and logged, and the
> > > update is complete (fast) in a single transaction.
> > >
> > > "(Obviously, for complex attr structures or large changes we still walk
> > > through the intent machinery.)
> > >
> > > "However, xfs/018 tests the behavior of the "larp" error injector, which
> > > only triggers from inside the attr intent state machine. Therefore, the
> > > short format tests don't actually trip the injector. It makes no sense
> > > to add a new larp injection callsite for the shortcut because either the
> > > single transaction gets written to disk or it doesn't."
> >
> > Make sense, but from looking at the test I'm still a bit confused
> > why it fails (vs just not testing something too useful)
>
> The golden output no longer matches because the attr update doesn't
> return EIO and shut down the filesystem due to the larp injection.
Ah, that's the missing bit. Can you add that blurb to the commit
message?
With that and the above:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] xfs/018: remove inline xattr recovery tests
2026-02-06 6:26 ` Christoph Hellwig
@ 2026-02-06 6:27 ` Darrick J. Wong
0 siblings, 0 replies; 16+ messages in thread
From: Darrick J. Wong @ 2026-02-06 6:27 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: zlang, linux-ext4, fstests
On Thu, Feb 05, 2026 at 10:26:12PM -0800, Christoph Hellwig wrote:
> On Thu, Feb 05, 2026 at 10:22:22PM -0800, Darrick J. Wong wrote:
> > On Thu, Feb 05, 2026 at 09:59:42PM -0800, Christoph Hellwig wrote:
> > > On Thu, Feb 05, 2026 at 08:56:24AM -0800, Darrick J. Wong wrote:
> > > > "In Linux 7.0 we've changed the extended attribute update code to try to
> > > > take a shortcut for performance reasons. Before walking through the
> > > > attr intent state machine (slow), the update will check to see if the
> > > > attr structure is in short format and will stay in that format after the
> > > > change. If so, then the incore inode can be updated and logged, and the
> > > > update is complete (fast) in a single transaction.
> > > >
> > > > "(Obviously, for complex attr structures or large changes we still walk
> > > > through the intent machinery.)
> > > >
> > > > "However, xfs/018 tests the behavior of the "larp" error injector, which
> > > > only triggers from inside the attr intent state machine. Therefore, the
> > > > short format tests don't actually trip the injector. It makes no sense
> > > > to add a new larp injection callsite for the shortcut because either the
> > > > single transaction gets written to disk or it doesn't."
> > >
> > > Make sense, but from looking at the test I'm still a bit confused
> > > why it fails (vs just not testing something too useful)
> >
> > The golden output no longer matches because the attr update doesn't
> > return EIO and shut down the filesystem due to the larp injection.
>
> Ah, that's the missing bit. Can you add that blurb to the commit
> message?
Will do!
> With that and the above:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks!
--D
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v1.1 1/3] xfs/018: remove inline xattr recovery tests
2026-02-02 19:11 ` [PATCH 1/3] xfs/018: remove inline xattr recovery tests Darrick J. Wong
2026-02-03 5:22 ` Christoph Hellwig
@ 2026-02-06 21:54 ` Darrick J. Wong
1 sibling, 0 replies; 16+ messages in thread
From: Darrick J. Wong @ 2026-02-06 21:54 UTC (permalink / raw)
To: zlang; +Cc: linux-ext4, fstests
From: Darrick J. Wong <djwong@kernel.org>
In Linux 7.0 we've changed the extended attribute update code to try to
take a shortcut for performance reasons. Before walking through the
attr intent state machine (slow), the update will check to see if the
attr structure is in short format and will stay in that format after the
change. If so, then the incore inode can be updated and logged, and
the update is complete (fast) in a single transaction.
(Obviously, for complex attr structures or large changes we still walk
through the intent machinery.)
However, xfs/018 tests the behavior of the "larp" error injector, which
only triggers from inside the attr intent state machine. Therefore, the
short format tests don't actually trip the injector. It makes no sense
to add a new larp injection callsite for the shortcut because either the
single transaction gets written to disk or it doesn't.
The golden output no longer matches because the attr update doesn't
return EIO and shut down the filesystem due to the larp injection.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
v1.1: improve commit message, add rvb
---
tests/xfs/018 | 24 ------------------------
tests/xfs/018.out | 45 ---------------------------------------------
2 files changed, 69 deletions(-)
diff --git a/tests/xfs/018 b/tests/xfs/018
index 8b6a3e1c508045..9b69c9cb14b33d 100755
--- a/tests/xfs/018
+++ b/tests/xfs/018
@@ -127,16 +127,6 @@ mkdir $testdir
require_larp
-# empty, inline
-create_test_file empty_file1 0
-test_attr_replay empty_file1 "attr_name" $attr64 "s" "larp"
-test_attr_replay empty_file1 "attr_name" $attr64 "r" "larp"
-
-# empty, inline with an unaligned value
-create_test_file empty_fileX 0
-test_attr_replay empty_fileX "attr_nameX" $attr17 "s" "larp"
-test_attr_replay empty_fileX "attr_nameX" $attr17 "r" "larp"
-
# empty, internal
create_test_file empty_file2 0
test_attr_replay empty_file2 "attr_name" $attr1k "s" "larp"
@@ -152,16 +142,6 @@ create_test_file empty_fileY 0
test_attr_replay empty_fileY "attr_name" $attr32l "s" "larp"
test_attr_replay empty_fileY "attr_name" $attr32l "r" "larp"
-# inline, inline
-create_test_file inline_file1 1 $attr16
-test_attr_replay inline_file1 "attr_name2" $attr64 "s" "larp"
-test_attr_replay inline_file1 "attr_name2" $attr64 "r" "larp"
-
-# inline, internal
-create_test_file inline_file2 1 $attr16
-test_attr_replay inline_file2 "attr_name2" $attr1k "s" "larp"
-test_attr_replay inline_file2 "attr_name2" $attr1k "r" "larp"
-
# inline, remote
create_test_file inline_file3 1 $attr16
test_attr_replay inline_file3 "attr_name2" $attr64k "s" "larp"
@@ -195,10 +175,6 @@ create_test_file remote_file2 1 $attr64k
test_attr_replay remote_file2 "attr_name2" $attr64k "s" "larp"
test_attr_replay remote_file2 "attr_name2" $attr64k "r" "larp"
-# replace shortform with different value
-create_test_file sf_file 2 $attr64
-test_attr_replay sf_file "attr_name2" $attr16 "s" "larp"
-
# replace leaf with different value
create_test_file leaf_file 3 $attr1k
test_attr_replay leaf_file "attr_name2" $attr256 "s" "larp"
diff --git a/tests/xfs/018.out b/tests/xfs/018.out
index ad8fd5266f06d0..be1d6422af65a5 100644
--- a/tests/xfs/018.out
+++ b/tests/xfs/018.out
@@ -1,26 +1,6 @@
QA output created by 018
*** mkfs
*** mount FS
-attr_set: Input/output error
-Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file1
-touch: cannot touch 'SCRATCH_MNT/testdir/empty_file1': Input/output error
-attr_name: e889d82dd111d6315d7b1edce2b1b30f -
-
-attr_remove: Input/output error
-Could not remove "attr_name" for SCRATCH_MNT/testdir/empty_file1
-touch: cannot touch 'SCRATCH_MNT/testdir/empty_file1': Input/output error
-attr_name: d41d8cd98f00b204e9800998ecf8427e -
-
-attr_set: Input/output error
-Could not set "attr_nameX" for SCRATCH_MNT/testdir/empty_fileX
-touch: cannot touch 'SCRATCH_MNT/testdir/empty_fileX': Input/output error
-attr_nameX: cb72c43fb97dd3cb4ac6ad2d9bd365e1 -
-
-attr_remove: Input/output error
-Could not remove "attr_nameX" for SCRATCH_MNT/testdir/empty_fileX
-touch: cannot touch 'SCRATCH_MNT/testdir/empty_fileX': Input/output error
-attr_nameX: d41d8cd98f00b204e9800998ecf8427e -
-
attr_set: Input/output error
Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file2
touch: cannot touch 'SCRATCH_MNT/testdir/empty_file2': Input/output error
@@ -51,26 +31,6 @@ Could not remove "attr_name" for SCRATCH_MNT/testdir/empty_fileY
touch: cannot touch 'SCRATCH_MNT/testdir/empty_fileY': Input/output error
attr_name: d41d8cd98f00b204e9800998ecf8427e -
-attr_set: Input/output error
-Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file1
-touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
-attr_name2: e889d82dd111d6315d7b1edce2b1b30f -
-
-attr_remove: Input/output error
-Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file1
-touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
-attr_name2: d41d8cd98f00b204e9800998ecf8427e -
-
-attr_set: Input/output error
-Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file2
-touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
-attr_name2: 4198214ee02e6ad7ac39559cd3e70070 -
-
-attr_remove: Input/output error
-Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file2
-touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
-attr_name2: d41d8cd98f00b204e9800998ecf8427e -
-
attr_set: Input/output error
Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file3
touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output error
@@ -131,11 +91,6 @@ Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file2
touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output error
attr_name2: d41d8cd98f00b204e9800998ecf8427e -
-attr_set: Input/output error
-Could not set "attr_name2" for SCRATCH_MNT/testdir/sf_file
-touch: cannot touch 'SCRATCH_MNT/testdir/sf_file': Input/output error
-attr_name2: e43df9b5a46b755ea8f1b4dd08265544 -
-
attr_set: Input/output error
Could not set "attr_name2" for SCRATCH_MNT/testdir/leaf_file
touch: cannot touch 'SCRATCH_MNT/testdir/leaf_file': Input/output error
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2026-02-06 21:54 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 19:11 [PATCHSET] fstests: more random fixes for v2026.01.27 Darrick J. Wong
2026-02-02 19:11 ` [PATCH 1/3] xfs/018: remove inline xattr recovery tests Darrick J. Wong
2026-02-03 5:22 ` Christoph Hellwig
2026-02-05 16:56 ` Darrick J. Wong
2026-02-05 17:19 ` Carlos Maiolino
2026-02-06 5:59 ` Christoph Hellwig
2026-02-06 6:22 ` Darrick J. Wong
2026-02-06 6:26 ` Christoph Hellwig
2026-02-06 6:27 ` Darrick J. Wong
2026-02-06 21:54 ` [PATCH v1.1 " Darrick J. Wong
2026-02-02 19:11 ` [PATCH 2/3] xfs/620: force xattr leaf format for this test Darrick J. Wong
2026-02-03 5:22 ` Christoph Hellwig
2026-02-05 17:15 ` Carlos Maiolino
2026-02-02 19:11 ` [PATCH 3/3] generic/749: don't write a ton of _mread output to seqres.full Darrick J. Wong
2026-02-03 5:23 ` Christoph Hellwig
2026-02-05 17:17 ` Carlos Maiolino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox