]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
generic: adjust strict SPO recovery testcases for f2fs
authorChao Yu <chao@kernel.org>
Sat, 21 May 2022 03:16:21 +0000 (11:16 +0800)
committerZorro Lang <zlang@kernel.org>
Thu, 2 Jun 2022 12:39:35 +0000 (20:39 +0800)
Testcases like generic 342/502/526/527 expect that filesystems will
recover all related metadata changes to the file which was fsynced
before sudden power off.

This patch adjusts to use "fsync_mode=strict" mountoption for f2fs
to pass these testcases.

Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/342
tests/generic/502
tests/generic/526
tests/generic/527

index 676b876b4f0a38eafb192f9bab74e0cb93ce0d7b..cdffaaf3f9e31fd942b3db2b8411e1a131a8a2d2 100755 (executable)
@@ -31,6 +31,11 @@ _require_dm_target flakey
 
 _scratch_mkfs >>$seqres.full 2>&1
 _require_metadata_journaling $SCRATCH_DEV
+
+if [ $FSTYP = "f2fs" ]; then
+       export MOUNT_OPTIONS="-o fsync_mode=strict $MOUNT_OPTIONS"
+fi
+
 _init_flakey
 _mount_flakey
 
index b0f9077fc3b3058e78ad747c09145ef9cc093b01..b5589b8139d17a447d74c8028371372cc0900cee 100755 (executable)
@@ -34,6 +34,11 @@ _require_dm_target flakey
 
 _scratch_mkfs >>$seqres.full 2>&1
 _require_metadata_journaling $SCRATCH_DEV
+
+if [ $FSTYP = "f2fs" ]; then
+       export MOUNT_OPTIONS="-o fsync_mode=strict $MOUNT_OPTIONS"
+fi
+
 _init_flakey
 _mount_flakey
 
index dc7cb36c198fcfb7043835cfa1fd6af7898e07fc..ada4dbeebd2253ebc7a09f894fa1eeacdf2e999e 100755 (executable)
@@ -32,6 +32,11 @@ _require_dm_target flakey
 
 _scratch_mkfs >>$seqres.full 2>&1
 _require_metadata_journaling $SCRATCH_DEV
+
+if [ $FSTYP = "f2fs" ]; then
+       export MOUNT_OPTIONS="-o fsync_mode=strict $MOUNT_OPTIONS"
+fi
+
 _init_flakey
 _mount_flakey
 
index 40cd1c6a29e8fc6fd360e79eab119c6696f7c47f..de09d1718f9c078666d31563d65619c5bbce3db9 100755 (executable)
@@ -32,6 +32,11 @@ _require_dm_target flakey
 
 _scratch_mkfs >>$seqres.full 2>&1
 _require_metadata_journaling $SCRATCH_DEV
+
+if [ $FSTYP = "f2fs" ]; then
+       export MOUNT_OPTIONS="-o fsync_mode=strict $MOUNT_OPTIONS"
+fi
+
 _init_flakey
 _mount_flakey