aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSun Ke <sunke32@huawei.com>2022-03-23 16:37:24 +0800
committerEryu Guan <guaneryu@gmail.com>2022-04-10 23:18:14 +0800
commitd019cd411869e44b6880c09757de299729396e75 (patch)
tree40368e5d10f98bf219b1f15ff151f2853984d6fd
parentb5660918c9826f62934469b3b61d9e1c920288d3 (diff)
downloadxfstests-dev-d019cd411869e44b6880c09757de299729396e75.tar.gz
generic/066: attr1 is still there after log replay on f2fs
The test fail on f2fs: xattr names and values after second fsync log replay: # file: SCRATCH_MNT/foobar +user.attr1="val1" user.attr3="val3" attr1 is still there after log replay. f2fs doesn't support fs-op level transaction functionality. so it have no way to persist all metadata updates in one transaction. We can use "fastboot" mountoption for this case, so during last fsync on qwerty, f2fs can trigger a checkpoint which will persist all metadata updates before fsync(). Suggested-by: Chao Yu <chao@kernel.org> Signed-off-by: Sun Ke <sunke32@huawei.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rwxr-xr-xtests/generic/0668
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/generic/066 b/tests/generic/066
index 105a7acd2c..d8a38655d3 100755
--- a/tests/generic/066
+++ b/tests/generic/066
@@ -56,6 +56,14 @@ sync
$SETFATTR_PROG -x user.attr2 $SCRATCH_MNT/foobar
$XFS_IO_PROG -c "fsync" $SCRATCH_MNT/foobar
+# f2fs doesn't support fs-op level transaction functionality. so it have no way
+# to persist all metadata updates in one transaction. We can use "fastboot"
+# mountoption for this case, so during last fsync on qwerty, f2fs can trigger a
+# checkpoint which will persist all metadata updates before fsync().
+if [ $FSTYP = "f2fs" ]; then
+ export MOUNT_OPTIONS="-o fastboot $MOUNT_OPTIONS"
+fi
+
_flakey_drop_and_remount
# After the fsync log is replayed, the file should have only 2 xattrs, the ones