All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: fstests@vger.kernel.org
Cc: guan@eryu.me, linux-f2fs-devel@lists.sourceforge.net, chao@kernel.org
Subject: [PATCH] generic: adjust strict SPO recovery testcases for f2fs
Date: Sat, 21 May 2022 11:16:21 +0800	[thread overview]
Message-ID: <20220521031621.3494402-1-chao@kernel.org> (raw)

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


WARNING: multiple messages have this Message-ID
From: Chao Yu <chao@kernel.org>
To: fstests@vger.kernel.org
Cc: guan@eryu.me, linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH] generic: adjust strict SPO recovery testcases for f2fs
Date: Sat, 21 May 2022 11:16:21 +0800	[thread overview]
Message-ID: <20220521031621.3494402-1-chao@kernel.org> (raw)

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

             reply	other threads:[~2022-05-21  3:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-21  3:16 Chao Yu [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220521031621.3494402-1-chao@kernel.org \
    --to=chao@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --subject='Re: [PATCH] generic: adjust strict SPO recovery testcases for f2fs' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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.