* [PATCH] generic: adjust strict SPO recovery testcases for f2fs
@ 2022-05-21 3:16 ` Chao Yu
0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2022-05-21 3:16 UTC (permalink / raw)
To: fstests; +Cc: guan, linux-f2fs-devel, chao
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>
---
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
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [f2fs-dev] [PATCH] generic: adjust strict SPO recovery testcases for f2fs
@ 2022-05-21 3:16 ` Chao Yu
0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2022-05-21 3:16 UTC (permalink / raw)
To: fstests; +Cc: guan, linux-f2fs-devel
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>
---
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
--
2.25.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] generic: adjust strict SPO recovery testcases for f2fs
2022-05-21 3:16 ` [f2fs-dev] " Chao Yu
@ 2022-05-31 16:04 ` Chao Yu
-1 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2022-05-31 16:04 UTC (permalink / raw)
To: fstests; +Cc: guan, linux-f2fs-devel, zlang
+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 <chao@kernel.org>
> ---
> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH] generic: adjust strict SPO recovery testcases for f2fs
@ 2022-05-31 16:04 ` Chao Yu
0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2022-05-31 16:04 UTC (permalink / raw)
To: fstests; +Cc: guan, zlang, linux-f2fs-devel
+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 <chao@kernel.org>
> ---
> 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
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] generic: adjust strict SPO recovery testcases for f2fs
2022-05-21 3:16 ` [f2fs-dev] " Chao Yu
@ 2022-05-31 19:33 ` Zorro Lang
-1 siblings, 0 replies; 6+ messages in thread
From: Zorro Lang @ 2022-05-31 19:33 UTC (permalink / raw)
To: Chao Yu; +Cc: fstests, linux-f2fs-devel
On Sat, May 21, 2022 at 11:16:21AM +0800, 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 <chao@kernel.org>
> ---
I don't have better idea, so it's good to me.
Reviewed-by: Zorro Lang <zlang@redhat.com>
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
> 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
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH] generic: adjust strict SPO recovery testcases for f2fs
@ 2022-05-31 19:33 ` Zorro Lang
0 siblings, 0 replies; 6+ messages in thread
From: Zorro Lang @ 2022-05-31 19:33 UTC (permalink / raw)
To: Chao Yu; +Cc: fstests, linux-f2fs-devel
On Sat, May 21, 2022 at 11:16:21AM +0800, 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 <chao@kernel.org>
> ---
I don't have better idea, so it's good to me.
Reviewed-by: Zorro Lang <zlang@redhat.com>
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
> 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
>
> --
> 2.25.1
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-05-31 19:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-21 3:16 [PATCH] generic: adjust strict SPO recovery testcases for f2fs Chao Yu
2022-05-21 3:16 ` [f2fs-dev] " Chao Yu
2022-05-31 16:04 ` Chao Yu
2022-05-31 16:04 ` [f2fs-dev] " Chao Yu
2022-05-31 19:33 ` Zorro Lang
2022-05-31 19:33 ` [f2fs-dev] " Zorro Lang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.