From d9d729cf021a9a43ccda0dbceb901dc253e60070 Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Sat, 21 May 2022 11:16:21 +0800 Subject: [PATCH] generic: adjust strict SPO recovery testcases for f2fs 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 Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- 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 676b876b4..cdffaaf3f 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 b0f9077fc..b5589b813 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 dc7cb36c1..ada4dbeeb 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 40cd1c6a2..de09d1718 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 -- 2.49.0