+Cc Zorro,

Any comments?

On 2022/5/21 11:16, Chao Yu wrote:
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 <[email protected]>
---
  tests/generic/342 | 5 +++++
  tests/generic/502 | 5 +++++
  tests/generic/526 | 5 +++++
  tests/generic/527 | 5 +++++
  4 files changed, 20 insertions(+)

diff --git a/tests/generic/342 b/tests/generic/342
index 676b876b..cdffaaf3 100755
--- a/tests/generic/342
+++ b/tests/generic/342
@@ -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
diff --git a/tests/generic/502 b/tests/generic/502
index b0f9077f..b5589b81 100755
--- a/tests/generic/502
+++ b/tests/generic/502
@@ -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
diff --git a/tests/generic/526 b/tests/generic/526
index dc7cb36c..ada4dbee 100755
--- a/tests/generic/526
+++ b/tests/generic/526
@@ -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
diff --git a/tests/generic/527 b/tests/generic/527
index 40cd1c6a..de09d171 100755
--- a/tests/generic/527
+++ b/tests/generic/527
@@ -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


_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to