linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH v2] generic/066: attr1 is still there after log replay on f2fs
@ 2022-03-11  9:43 Sun Ke via Linux-f2fs-devel
  2022-03-15  4:01 ` Chao Yu via Linux-f2fs-devel
  0 siblings, 1 reply; 3+ messages in thread
From: Sun Ke via Linux-f2fs-devel @ 2022-03-11  9:43 UTC (permalink / raw)
  To: fstests, guan; +Cc: sunke32, jaegeuk, david, linux-f2fs-devel

The test fail on f2fs:
     xattr names and values after second fsync log replay:
     # file: SCRATCH_MNT/foobar
    +user.attr1="val1"
     user.attr3="val3"

attr1 is still there after log replay. f2fs doesn't support fs-op level
transaction functionality. so it have no way to persist all metadata
updates in one transaction.  We can use "fastboot" mountoption for this
case, so during last fsync on qwerty, f2fs can trigger a checkpoint
which will persist all metadata updates before fsync().

Suggested-by: Chao Yu <chao@kernel.org>
Signed-off-by: Sun Ke <sunke32@huawei.com>
---
 tests/generic/066 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/generic/066 b/tests/generic/066
index 105a7acd..b8465101 100755
--- a/tests/generic/066
+++ b/tests/generic/066
@@ -56,6 +56,14 @@ sync
 $SETFATTR_PROG -x user.attr2 $SCRATCH_MNT/foobar
 $XFS_IO_PROG -c "fsync" $SCRATCH_MNT/foobar
 
+# f2fs doesn't support fs-op level transaction functionality. so it have no way
+# to persist all metadata updates in one transaction.  We can use "fastboot"
+# mountoption for this case, so during last fsync on qwerty, f2fs can trigger a
+# checkpoint which will persist all metadata updates before fsync().
+if [ $FSTYP = "f2fs" ]; then
+	export MOUNT_OPTIONS="-o fastboot"
+fi
+
 _flakey_drop_and_remount
 
 # After the fsync log is replayed, the file should have only 2 xattrs, the ones
-- 
2.13.6



_______________________________________________
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] 3+ messages in thread

* Re: [f2fs-dev] [PATCH v2] generic/066: attr1 is still there after log replay on f2fs
  2022-03-11  9:43 [f2fs-dev] [PATCH v2] generic/066: attr1 is still there after log replay on f2fs Sun Ke via Linux-f2fs-devel
@ 2022-03-15  4:01 ` Chao Yu via Linux-f2fs-devel
  2022-03-15  9:34   ` Sun Ke via Linux-f2fs-devel
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2022-03-15  4:01 UTC (permalink / raw)
  To: Sun Ke, fstests, guan; +Cc: jaegeuk, david, linux-f2fs-devel

On 2022/3/11 17:43, Sun Ke via Linux-f2fs-devel wrote:
> The test fail on f2fs:
>       xattr names and values after second fsync log replay:
>       # file: SCRATCH_MNT/foobar
>      +user.attr1="val1"
>       user.attr3="val3"
> 
> attr1 is still there after log replay. f2fs doesn't support fs-op level
> transaction functionality. so it have no way to persist all metadata
> updates in one transaction.  We can use "fastboot" mountoption for this
> case, so during last fsync on qwerty, f2fs can trigger a checkpoint
> which will persist all metadata updates before fsync().
> 
> Suggested-by: Chao Yu <chao@kernel.org>
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
>   tests/generic/066 | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/tests/generic/066 b/tests/generic/066
> index 105a7acd..b8465101 100755
> --- a/tests/generic/066
> +++ b/tests/generic/066
> @@ -56,6 +56,14 @@ sync
>   $SETFATTR_PROG -x user.attr2 $SCRATCH_MNT/foobar
>   $XFS_IO_PROG -c "fsync" $SCRATCH_MNT/foobar
>   
> +# f2fs doesn't support fs-op level transaction functionality. so it have no way
> +# to persist all metadata updates in one transaction.  We can use "fastboot"
> +# mountoption for this case, so during last fsync on qwerty, f2fs can trigger a
> +# checkpoint which will persist all metadata updates before fsync().
> +if [ $FSTYP = "f2fs" ]; then
> +	export MOUNT_OPTIONS="-o fastboot"

Can we merge "fastboot" with original mount options? and after the test, how about
recovering to original mount options?

Thanks,

> +fi
> +
>   _flakey_drop_and_remount
>   
>   # After the fsync log is replayed, the file should have only 2 xattrs, the ones


_______________________________________________
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] 3+ messages in thread

* Re: [f2fs-dev] [PATCH v2] generic/066: attr1 is still there after log replay on f2fs
  2022-03-15  4:01 ` Chao Yu via Linux-f2fs-devel
@ 2022-03-15  9:34   ` Sun Ke via Linux-f2fs-devel
  0 siblings, 0 replies; 3+ messages in thread
From: Sun Ke via Linux-f2fs-devel @ 2022-03-15  9:34 UTC (permalink / raw)
  To: Chao Yu, fstests, guan; +Cc: jaegeuk, david, linux-f2fs-devel



在 2022/3/15 12:01, Chao Yu 写道:
> On 2022/3/11 17:43, Sun Ke via Linux-f2fs-devel wrote:
>> The test fail on f2fs:
>>       xattr names and values after second fsync log replay:
>>       # file: SCRATCH_MNT/foobar
>>      +user.attr1="val1"
>>       user.attr3="val3"
>>
>> attr1 is still there after log replay. f2fs doesn't support fs-op level
>> transaction functionality. so it have no way to persist all metadata
>> updates in one transaction.  We can use "fastboot" mountoption for this
>> case, so during last fsync on qwerty, f2fs can trigger a checkpoint
>> which will persist all metadata updates before fsync().
>>
>> Suggested-by: Chao Yu <chao@kernel.org>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>>   tests/generic/066 | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/tests/generic/066 b/tests/generic/066
>> index 105a7acd..b8465101 100755
>> --- a/tests/generic/066
>> +++ b/tests/generic/066
>> @@ -56,6 +56,14 @@ sync
>>   $SETFATTR_PROG -x user.attr2 $SCRATCH_MNT/foobar
>>   $XFS_IO_PROG -c "fsync" $SCRATCH_MNT/foobar
>> +# f2fs doesn't support fs-op level transaction functionality. so it 
>> have no way
>> +# to persist all metadata updates in one transaction.  We can use 
>> "fastboot"
>> +# mountoption for this case, so during last fsync on qwerty, f2fs can 
>> trigger a
>> +# checkpoint which will persist all metadata updates before fsync().
>> +if [ $FSTYP = "f2fs" ]; then
>> +    export MOUNT_OPTIONS="-o fastboot"
> 
> Can we merge "fastboot" with original mount options? and after the test, 
> how about
> recovering to original mount options?
> 
> Thanks,

Like this:

  if [ $FSTYP = "f2fs" ]; then
-       export MOUNT_OPTIONS="-o fastboot"
+       export MOUNT_OPTIONS="-o fastboot $MOUNT_OPTIONS"
  fi

right?

And I have tested that there is no need to recover to original mount 
options after the test. It will be the original one in the next test.

Thanks,
Sun Ke

> 
>> +fi
>> +
>>   _flakey_drop_and_remount
>>   # After the fsync log is replayed, the file should have only 2 
>> xattrs, the ones
> .


_______________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2022-03-15  9:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-11  9:43 [f2fs-dev] [PATCH v2] generic/066: attr1 is still there after log replay on f2fs Sun Ke via Linux-f2fs-devel
2022-03-15  4:01 ` Chao Yu via Linux-f2fs-devel
2022-03-15  9:34   ` Sun Ke via Linux-f2fs-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).