generic: adjust strict SPO recovery testcases for f2fs
PATCH 1/1 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.
--- tests/generic/342 | 5 +++++ tests/generic/502 | 5 +++++ tests/generic/526 | 5 +++++ tests/generic/527 | 5 +++++ 4 files changed, 20 insertions(+)
tests/generic/342 +5 -0
@@ -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
tests/generic/502 +5 -0
@@ -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
tests/generic/526 +5 -0
@@ -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
tests/generic/527 +5 -0
@@ -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
Signature · 1 line
2.25.1
+Cc Zorro,
Any comments?
Quoted 79 lines · Chao Yu
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(+)tests/generic/342 +5
-0@@ -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_flakeytests/generic/502 +5
-0@@ -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_flakeytests/generic/526 +5
-0@@ -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_flakeytests/generic/527 +5
-0@@ -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
Quoted 9 lines · Chao Yu
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]>---
I don't have better idea, so it's good to me.
I'm thinking about is there only f2fs has this kind of requirement? If this's not a single problem, we can help a common helper for that. But if only f2fs, I think this change is fine.
Welcome better ideas if anyone else has. If no more, I'll merge it.
Thanks,
Zorro
Quoted 73 lines
tests/generic/342 | 5 +++++ tests/generic/502 | 5 +++++ tests/generic/526 | 5 +++++ tests/generic/527 | 5 +++++ 4 files changed, 20 insertions(+)tests/generic/342 +5
-0@@ -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_flakeytests/generic/502 +5
-0@@ -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_flakeytests/generic/526 +5
-0@@ -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_flakeytests/generic/527 +5
-0@@ -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_flakeySignature · 1 line
2.25.1