* [PATCH] common/rc: f2fs do not support metadata journaling
@ 2021-06-11 11:22 Sun Ke
2021-06-11 11:22 ` [PATCH] generic/103: leave more space for f2fs Sun Ke
` (2 more replies)
0 siblings, 3 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-11 11:22 UTC (permalink / raw)
To: fstests, guan, yuchao0; +Cc: sunke32
In generic/50, touch 100 files, go down the fs immediately, Then umount
and set the disk readi-only. Try to mount it again without \-o
norecovery\, it should fail, because it can not recovery on a read-only
device. But f2fs mount successfully and the test fail.
f2fs seems do not support metadata journaling.
Signed-off-by: Sun Ke <sunke32@huawei.com>
---
I am not very sure if f2fs do not support metadata journaling.
###
before change
###
[root@localhost xfstests-dev]# ./check tests/generic/050
FSTYP -- f2fs
PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
MKFS_OPTIONS -- /dev/sdb
MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
generic/050 4s ... - output mismatch (see /root/work/xfstests-dev/results//generic/050.out.bad)
--- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
+++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-11 16:48:19.993000000 +0800
@@ -13,9 +13,7 @@
setting device read-only
mounting filesystem that needs recovery on a read-only device:
mount: device write-protected, mounting read-only
-mount: cannot mount device read-only
unmounting read-only filesystem
-umount: SCRATCH_DEV: not mounted
mounting filesystem with -o norecovery on a read-only device:
...
(Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out /root/work/xfstests-dev/results//generic/050.out.bad' to see the entire diff)
Ran: generic/050
Failures: generic/050
Failed 1 of 1 tests
###
after change
###
[root@localhost xfstests-dev]# ./check tests/generic/050
FSTYP -- f2fs
PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
MKFS_OPTIONS -- /dev/sdb
MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
generic/050 4s ... 4s
Ran: generic/050
Passed all 1 tests
common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index a0aa7300..428b8b80 100644
--- a/common/rc
+++ b/common/rc
@@ -3543,7 +3543,7 @@ _has_metadata_journaling()
fi
case "$FSTYP" in
- ext2|vfat|msdos|udf|exfat|tmpfs)
+ ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
echo "$FSTYP does not support metadata journaling"
return 1
;;
--
2.13.6
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH] generic/103: leave more space for f2fs
2021-06-11 11:22 [PATCH] common/rc: f2fs do not support metadata journaling Sun Ke
@ 2021-06-11 11:22 ` Sun Ke
2021-06-13 14:44 ` Eryu Guan
2021-06-15 3:28 ` [f2fs-dev] " Sun Ke
2021-06-11 11:22 ` [PATCH] generic/260: f2fs is also special Sun Ke
2021-06-15 3:25 ` [f2fs-dev] " Sun Ke
2 siblings, 2 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-11 11:22 UTC (permalink / raw)
To: fstests, guan, yuchao0; +Cc: sunke32
It failed on f2fs:
QA output created by 103
+fallocate: No space left on device
Silence is golden.
...
Try to leave ~512KB, but during the fallocate, f2fs will be filled.
Provide error prompt: "fallocate: No space left on device".
Leave more space for f2fs.
Signed-off-by: Sun Ke <sunke32@huawei.com>
---
I add some test code
+ df
avail=`_get_available_space $SCRATCH_MNT`
+ echo "avail = ${avail}"
filesizekb=$((avail / 1024 - 512))
+ echo "filesizekb = ${filesizekb}"
$XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
+ df
}
f2fs:
QA output created by 103
+Filesystem 1K-blocks Used Available Use% Mounted on
...
+/dev/sdb 12580864 553292 12027572 5% /mnt/scratch
+avail = 12316233728
+filesizekb = 12027060
+fallocate: No space left on device
+Filesystem 1K-blocks Used Available Use% Mounted on
...
+/dev/sdb 12580864 12580864 0 100% /mnt/scratch
Silence is golden.
xfs:
QA output created by 103
+Filesystem 1K-blocks Used Available Use% Mounted on
...
+/dev/sdb 12572672 120828 12451844 1% /mnt/scratch
+avail = 12750688256
+filesizekb = 12451332
+Filesystem 1K-blocks Used Available Use% Mounted on
...
+/dev/sdb 12572672 12572160 512 100% /mnt/scratch
Silence is golden.
f2fs:
QA output created by 103
+Filesystem 1K-blocks Used Available Use% Mounted on
...
+/dev/sdb 12319880 41048 11633304 1% /mnt/scratch
+avail = 11912503296
+filesizekb = 11632792
+Filesystem 1K-blocks Used Available Use% Mounted on
...
+/dev/sdb 12319880 11673844 508 100% /mnt/scratch
Silence is golden.
after change (f2fs)
QA output created by 103
Filesystem 1K-blocks Used Available Use% Mounted on
...
/dev/sdb 12580864 12580396 468 100% /tmp/scratch
Silence is golden.
tests/generic/103 | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/generic/103 b/tests/generic/103
index b22b0159623e..dfce3870781c 100755
--- a/tests/generic/103
+++ b/tests/generic/103
@@ -40,10 +40,18 @@ rm -f $seqres.full
_consume_freesp()
{
file=$1
+ leave=512
+
+ # Try to leave ~512KB, but during the fallocate, f2fs will be filled.
+ # Provide error prompt: "fallocate: No space left on device". Leave
+ # more space for f2fs.
+ if [ $FSTYP == "f2fs" ]; then
+ leave=12288
+ fi
# consume nearly all available space (leave ~512kB)
avail=`_get_available_space $SCRATCH_MNT`
- filesizekb=$((avail / 1024 - 512))
+ filesizekb=$((avail / 1024 - $leave))
$XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
}
--
2.25.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH] generic/260: f2fs is also special
2021-06-11 11:22 [PATCH] common/rc: f2fs do not support metadata journaling Sun Ke
2021-06-11 11:22 ` [PATCH] generic/103: leave more space for f2fs Sun Ke
@ 2021-06-11 11:22 ` Sun Ke
2021-06-15 3:29 ` [f2fs-dev] " Sun Ke
2021-06-15 3:25 ` [f2fs-dev] " Sun Ke
2 siblings, 1 reply; 27+ messages in thread
From: Sun Ke @ 2021-06-11 11:22 UTC (permalink / raw)
To: fstests, guan, yuchao0; +Cc: sunke32
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="yes", Size: 1651 bytes --]
It seem that f2fs also special like btrfs.
[+] Default length with start set (should succeed)
[+] Length beyond the end of fs (should succeed)
[+] Length beyond the end of fs with start set (should succeed)
+After the full fs discard 0 bytes were discarded however the file system is 12882804736 bytes long.
+It seems that fs logic handling len argument overflows
Signed-off-by: Sun Ke <sunke32@huawei.com>
---
I am not sure about that. o(╯□╰)o
tests/generic/260 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/generic/260 b/tests/generic/260
index 8021aa68..6bd861d2 100755
--- a/tests/generic/260
+++ b/tests/generic/260
@@ -100,7 +100,7 @@ fi
# It is because btrfs does not have not-yet-used parts of the device
# mapped and since we got here right after the mkfs, there is not
# enough free extents in the root tree.
-if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
+if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
status=1
echo "After the full fs discard $bytes bytes were discarded"\
"however the file system is $(_math "$fssize*1024") bytes long."
@@ -160,7 +160,7 @@ _scratch_mount
# mapped and since we got here right after the mkfs, there is not
# enough free extents in the root tree.
bytes=$($FSTRIM_PROG -v -l$len $SCRATCH_MNT | _filter_fstrim)
-if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
+if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
status=1
echo "It seems that fs logic handling len argument overflows"
fi
--
2.13.6
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] generic/103: leave more space for f2fs
2021-06-11 11:22 ` [PATCH] generic/103: leave more space for f2fs Sun Ke
@ 2021-06-13 14:44 ` Eryu Guan
2021-06-15 3:36 ` Sun Ke
2021-06-15 3:28 ` [f2fs-dev] " Sun Ke
1 sibling, 1 reply; 27+ messages in thread
From: Eryu Guan @ 2021-06-13 14:44 UTC (permalink / raw)
To: Sun Ke; +Cc: fstests, yuchao0
On Fri, Jun 11, 2021 at 07:22:10PM +0800, Sun Ke wrote:
> It failed on f2fs:
> QA output created by 103
> +fallocate: No space left on device
> Silence is golden.
> ...
>
> Try to leave ~512KB, but during the fallocate, f2fs will be filled.
> Provide error prompt: "fallocate: No space left on device".
>
> Leave more space for f2fs.
And this also could be a bug in f2fs, that couldn't fallocate enough
space when free space is larger than request size.
I think the whole patchset needs review from f2fs folks.
Thanks,
Eryu
>
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
> I add some test code
> + df
> avail=`_get_available_space $SCRATCH_MNT`
> + echo "avail = ${avail}"
> filesizekb=$((avail / 1024 - 512))
> + echo "filesizekb = ${filesizekb}"
> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
> + df
> }
>
> f2fs:
> QA output created by 103
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch
> +avail = 12316233728
> +filesizekb = 12027060
> +fallocate: No space left on device
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch
> Silence is golden.
>
> xfs:
> QA output created by 103
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch
> +avail = 12750688256
> +filesizekb = 12451332
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch
> Silence is golden.
>
> f2fs:
> QA output created by 103
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch
> +avail = 11912503296
> +filesizekb = 11632792
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch
> Silence is golden.
>
> after change (f2fs)
> QA output created by 103
> Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> /dev/sdb 12580864 12580396 468 100% /tmp/scratch
> Silence is golden.
>
> tests/generic/103 | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/tests/generic/103 b/tests/generic/103
> index b22b0159623e..dfce3870781c 100755
> --- a/tests/generic/103
> +++ b/tests/generic/103
> @@ -40,10 +40,18 @@ rm -f $seqres.full
> _consume_freesp()
> {
> file=$1
> + leave=512
> +
> + # Try to leave ~512KB, but during the fallocate, f2fs will be filled.
> + # Provide error prompt: "fallocate: No space left on device". Leave
> + # more space for f2fs.
> + if [ $FSTYP == "f2fs" ]; then
> + leave=12288
> + fi
>
> # consume nearly all available space (leave ~512kB)
> avail=`_get_available_space $SCRATCH_MNT`
> - filesizekb=$((avail / 1024 - 512))
> + filesizekb=$((avail / 1024 - $leave))
> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
> }
>
> --
> 2.25.4
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] common/rc: f2fs do not support metadata journaling
2021-06-11 11:22 [PATCH] common/rc: f2fs do not support metadata journaling Sun Ke
@ 2021-06-15 3:25 ` Sun Ke
2021-06-11 11:22 ` [PATCH] generic/260: f2fs is also special Sun Ke
2021-06-15 3:25 ` [f2fs-dev] " Sun Ke
2 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-15 3:25 UTC (permalink / raw)
To: fstests, guan, yuchao0, linux-f2fs-devel
在 2021/6/11 19:22, Sun Ke 写道:
> In generic/50, touch 100 files, go down the fs immediately, Then umount
> and set the disk readi-only. Try to mount it again without \-o
> norecovery\, it should fail, because it can not recovery on a read-only
> device. But f2fs mount successfully and the test fail.
>
> f2fs seems do not support metadata journaling.
>
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
>
> I am not very sure if f2fs do not support metadata journaling.
>
> ###
> before change
> ###
> [root@localhost xfstests-dev]# ./check tests/generic/050
> FSTYP -- f2fs
> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
> MKFS_OPTIONS -- /dev/sdb
> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>
> generic/050 4s ... - output mismatch (see /root/work/xfstests-dev/results//generic/050.out.bad)
> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
> +++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-11 16:48:19.993000000 +0800
> @@ -13,9 +13,7 @@
> setting device read-only
> mounting filesystem that needs recovery on a read-only device:
> mount: device write-protected, mounting read-only
> -mount: cannot mount device read-only
> unmounting read-only filesystem
> -umount: SCRATCH_DEV: not mounted
> mounting filesystem with -o norecovery on a read-only device:
> ...
> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out /root/work/xfstests-dev/results//generic/050.out.bad' to see the entire diff)
> Ran: generic/050
> Failures: generic/050
> Failed 1 of 1 tests
>
> ###
> after change
> ###
> [root@localhost xfstests-dev]# ./check tests/generic/050
> FSTYP -- f2fs
> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
> MKFS_OPTIONS -- /dev/sdb
> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>
> generic/050 4s ... 4s
> Ran: generic/050
> Passed all 1 tests
>
>
>
> common/rc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/rc b/common/rc
> index a0aa7300..428b8b80 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
> fi
>
> case "$FSTYP" in
> - ext2|vfat|msdos|udf|exfat|tmpfs)
> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
> echo "$FSTYP does not support metadata journaling"
> return 1
> ;;
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling
@ 2021-06-15 3:25 ` Sun Ke
0 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-15 3:25 UTC (permalink / raw)
To: fstests, guan, yuchao0, linux-f2fs-devel
在 2021/6/11 19:22, Sun Ke 写道:
> In generic/50, touch 100 files, go down the fs immediately, Then umount
> and set the disk readi-only. Try to mount it again without \-o
> norecovery\, it should fail, because it can not recovery on a read-only
> device. But f2fs mount successfully and the test fail.
>
> f2fs seems do not support metadata journaling.
>
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
>
> I am not very sure if f2fs do not support metadata journaling.
>
> ###
> before change
> ###
> [root@localhost xfstests-dev]# ./check tests/generic/050
> FSTYP -- f2fs
> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
> MKFS_OPTIONS -- /dev/sdb
> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>
> generic/050 4s ... - output mismatch (see /root/work/xfstests-dev/results//generic/050.out.bad)
> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
> +++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-11 16:48:19.993000000 +0800
> @@ -13,9 +13,7 @@
> setting device read-only
> mounting filesystem that needs recovery on a read-only device:
> mount: device write-protected, mounting read-only
> -mount: cannot mount device read-only
> unmounting read-only filesystem
> -umount: SCRATCH_DEV: not mounted
> mounting filesystem with -o norecovery on a read-only device:
> ...
> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out /root/work/xfstests-dev/results//generic/050.out.bad' to see the entire diff)
> Ran: generic/050
> Failures: generic/050
> Failed 1 of 1 tests
>
> ###
> after change
> ###
> [root@localhost xfstests-dev]# ./check tests/generic/050
> FSTYP -- f2fs
> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
> MKFS_OPTIONS -- /dev/sdb
> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>
> generic/050 4s ... 4s
> Ran: generic/050
> Passed all 1 tests
>
>
>
> common/rc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/rc b/common/rc
> index a0aa7300..428b8b80 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
> fi
>
> case "$FSTYP" in
> - ext2|vfat|msdos|udf|exfat|tmpfs)
> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
> echo "$FSTYP does not support metadata journaling"
> return 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] 27+ messages in thread
* Re: [PATCH] generic/103: leave more space for f2fs
2021-06-11 11:22 ` [PATCH] generic/103: leave more space for f2fs Sun Ke
@ 2021-06-15 3:28 ` Sun Ke
2021-06-15 3:28 ` [f2fs-dev] " Sun Ke
1 sibling, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-15 3:28 UTC (permalink / raw)
To: fstests, guan, yuchao0, linux-f2fs-devel
to linux-f2fs-devel@lists.sourceforge.net
在 2021/6/11 19:22, Sun Ke 写道:
> It failed on f2fs:
> QA output created by 103
> +fallocate: No space left on device
> Silence is golden.
> ...
>
> Try to leave ~512KB, but during the fallocate, f2fs will be filled.
> Provide error prompt: "fallocate: No space left on device".
>
> Leave more space for f2fs.
>
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
> I add some test code
> + df
> avail=`_get_available_space $SCRATCH_MNT`
> + echo "avail = ${avail}"
> filesizekb=$((avail / 1024 - 512))
> + echo "filesizekb = ${filesizekb}"
> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
> + df
> }
>
> f2fs:
> QA output created by 103
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch
> +avail = 12316233728
> +filesizekb = 12027060
> +fallocate: No space left on device
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch
> Silence is golden.
>
> xfs:
> QA output created by 103
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch
> +avail = 12750688256
> +filesizekb = 12451332
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch
> Silence is golden.
>
> ext4:
> QA output created by 103
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch
> +avail = 11912503296
> +filesizekb = 11632792
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch
> Silence is golden.
>
> after change (f2fs)
> QA output created by 103
> Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> /dev/sdb 12580864 12580396 468 100% /tmp/scratch
> Silence is golden.
>
> tests/generic/103 | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/tests/generic/103 b/tests/generic/103
> index b22b0159623e..dfce3870781c 100755
> --- a/tests/generic/103
> +++ b/tests/generic/103
> @@ -40,10 +40,18 @@ rm -f $seqres.full
> _consume_freesp()
> {
> file=$1
> + leave=512
> +
> + # Try to leave ~512KB, but during the fallocate, f2fs will be filled.
> + # Provide error prompt: "fallocate: No space left on device". Leave
> + # more space for f2fs.
> + if [ $FSTYP == "f2fs" ]; then
> + leave=12288
> + fi
>
> # consume nearly all available space (leave ~512kB)
> avail=`_get_available_space $SCRATCH_MNT`
> - filesizekb=$((avail / 1024 - 512))
> + filesizekb=$((avail / 1024 - $leave))
> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
> }
>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/103: leave more space for f2fs
@ 2021-06-15 3:28 ` Sun Ke
0 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-15 3:28 UTC (permalink / raw)
To: fstests, guan, yuchao0, linux-f2fs-devel
to linux-f2fs-devel@lists.sourceforge.net
在 2021/6/11 19:22, Sun Ke 写道:
> It failed on f2fs:
> QA output created by 103
> +fallocate: No space left on device
> Silence is golden.
> ...
>
> Try to leave ~512KB, but during the fallocate, f2fs will be filled.
> Provide error prompt: "fallocate: No space left on device".
>
> Leave more space for f2fs.
>
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
> I add some test code
> + df
> avail=`_get_available_space $SCRATCH_MNT`
> + echo "avail = ${avail}"
> filesizekb=$((avail / 1024 - 512))
> + echo "filesizekb = ${filesizekb}"
> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
> + df
> }
>
> f2fs:
> QA output created by 103
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch
> +avail = 12316233728
> +filesizekb = 12027060
> +fallocate: No space left on device
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch
> Silence is golden.
>
> xfs:
> QA output created by 103
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch
> +avail = 12750688256
> +filesizekb = 12451332
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch
> Silence is golden.
>
> ext4:
> QA output created by 103
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch
> +avail = 11912503296
> +filesizekb = 11632792
> +Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch
> Silence is golden.
>
> after change (f2fs)
> QA output created by 103
> Filesystem 1K-blocks Used Available Use% Mounted on
> ...
> /dev/sdb 12580864 12580396 468 100% /tmp/scratch
> Silence is golden.
>
> tests/generic/103 | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/tests/generic/103 b/tests/generic/103
> index b22b0159623e..dfce3870781c 100755
> --- a/tests/generic/103
> +++ b/tests/generic/103
> @@ -40,10 +40,18 @@ rm -f $seqres.full
> _consume_freesp()
> {
> file=$1
> + leave=512
> +
> + # Try to leave ~512KB, but during the fallocate, f2fs will be filled.
> + # Provide error prompt: "fallocate: No space left on device". Leave
> + # more space for f2fs.
> + if [ $FSTYP == "f2fs" ]; then
> + leave=12288
> + fi
>
> # consume nearly all available space (leave ~512kB)
> avail=`_get_available_space $SCRATCH_MNT`
> - filesizekb=$((avail / 1024 - 512))
> + filesizekb=$((avail / 1024 - $leave))
> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
> }
>
>
_______________________________________________
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] 27+ messages in thread
* Re: [PATCH] generic/260: f2fs is also special
2021-06-11 11:22 ` [PATCH] generic/260: f2fs is also special Sun Ke
@ 2021-06-15 3:29 ` Sun Ke
0 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-15 3:29 UTC (permalink / raw)
To: fstests, guan, yuchao0, linux-f2fs-devel
to linux-f2fs-devel@lists.sourceforge.net
在 2021/6/11 19:22, Sun Ke 写道:
> It seem that f2fs also special like btrfs.
>
> [+] Default length with start set (should succeed)
> [+] Length beyond the end of fs (should succeed)
> [+] Length beyond the end of fs with start set (should succeed)
> +After the full fs discard 0 bytes were discarded however the file system is 12882804736 bytes long.
> +It seems that fs logic handling len argument overflows
>
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
> I am not sure about that. o(╯□╰)o
>
> tests/generic/260 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/generic/260 b/tests/generic/260
> index 8021aa68..6bd861d2 100755
> --- a/tests/generic/260
> +++ b/tests/generic/260
> @@ -100,7 +100,7 @@ fi
> # It is because btrfs does not have not-yet-used parts of the device
> # mapped and since we got here right after the mkfs, there is not
> # enough free extents in the root tree.
> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
> status=1
> echo "After the full fs discard $bytes bytes were discarded"\
> "however the file system is $(_math "$fssize*1024") bytes long."
> @@ -160,7 +160,7 @@ _scratch_mount
> # mapped and since we got here right after the mkfs, there is not
> # enough free extents in the root tree.
> bytes=$($FSTRIM_PROG -v -l$len $SCRATCH_MNT | _filter_fstrim)
> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
> status=1
> echo "It seems that fs logic handling len argument overflows"
> fi
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/260: f2fs is also special
@ 2021-06-15 3:29 ` Sun Ke
0 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-15 3:29 UTC (permalink / raw)
To: fstests, guan, yuchao0, linux-f2fs-devel
to linux-f2fs-devel@lists.sourceforge.net
在 2021/6/11 19:22, Sun Ke 写道:
> It seem that f2fs also special like btrfs.
>
> [+] Default length with start set (should succeed)
> [+] Length beyond the end of fs (should succeed)
> [+] Length beyond the end of fs with start set (should succeed)
> +After the full fs discard 0 bytes were discarded however the file system is 12882804736 bytes long.
> +It seems that fs logic handling len argument overflows
>
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
> I am not sure about that. o(╯□╰)o
>
> tests/generic/260 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/generic/260 b/tests/generic/260
> index 8021aa68..6bd861d2 100755
> --- a/tests/generic/260
> +++ b/tests/generic/260
> @@ -100,7 +100,7 @@ fi
> # It is because btrfs does not have not-yet-used parts of the device
> # mapped and since we got here right after the mkfs, there is not
> # enough free extents in the root tree.
> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
> status=1
> echo "After the full fs discard $bytes bytes were discarded"\
> "however the file system is $(_math "$fssize*1024") bytes long."
> @@ -160,7 +160,7 @@ _scratch_mount
> # mapped and since we got here right after the mkfs, there is not
> # enough free extents in the root tree.
> bytes=$($FSTRIM_PROG -v -l$len $SCRATCH_MNT | _filter_fstrim)
> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
> status=1
> echo "It seems that fs logic handling len argument overflows"
> fi
>
_______________________________________________
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] 27+ messages in thread
* Re: [PATCH] generic/103: leave more space for f2fs
2021-06-13 14:44 ` Eryu Guan
@ 2021-06-15 3:36 ` Sun Ke
0 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-15 3:36 UTC (permalink / raw)
To: Eryu Guan; +Cc: fstests, yuchao0
在 2021/6/13 22:44, Eryu Guan 写道:
> On Fri, Jun 11, 2021 at 07:22:10PM +0800, Sun Ke wrote:
>> It failed on f2fs:
>> QA output created by 103
>> +fallocate: No space left on device
>> Silence is golden.
>> ...
>>
>> Try to leave ~512KB, but during the fallocate, f2fs will be filled.
>> Provide error prompt: "fallocate: No space left on device".
>>
>> Leave more space for f2fs.
>
> And this also could be a bug in f2fs, that couldn't fallocate enough
> space when free space is larger than request size.
>
> I think the whole patchset needs review from f2fs folks.
>
> Thanks,
> Eryu
I have cc linux-f2fs-devel@lists.sourceforge.net.
Thanks,
Sun Ke
>
>>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>> I add some test code
>> + df
>> avail=`_get_available_space $SCRATCH_MNT`
>> + echo "avail = ${avail}"
>> filesizekb=$((avail / 1024 - 512))
>> + echo "filesizekb = ${filesizekb}"
>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>> + df
>> }
>>
>> f2fs:
>> QA output created by 103
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch
>> +avail = 12316233728
>> +filesizekb = 12027060
>> +fallocate: No space left on device
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch
>> Silence is golden.
>>
>> xfs:
>> QA output created by 103
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch
>> +avail = 12750688256
>> +filesizekb = 12451332
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch
>> Silence is golden.
>>
>> f2fs:
>> QA output created by 103
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch
>> +avail = 11912503296
>> +filesizekb = 11632792
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch
>> Silence is golden.
>>
>> after change (f2fs)
>> QA output created by 103
>> Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> /dev/sdb 12580864 12580396 468 100% /tmp/scratch
>> Silence is golden.
>>
>> tests/generic/103 | 10 +++++++++-
>> 1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/generic/103 b/tests/generic/103
>> index b22b0159623e..dfce3870781c 100755
>> --- a/tests/generic/103
>> +++ b/tests/generic/103
>> @@ -40,10 +40,18 @@ rm -f $seqres.full
>> _consume_freesp()
>> {
>> file=$1
>> + leave=512
>> +
>> + # Try to leave ~512KB, but during the fallocate, f2fs will be filled.
>> + # Provide error prompt: "fallocate: No space left on device". Leave
>> + # more space for f2fs.
>> + if [ $FSTYP == "f2fs" ]; then
>> + leave=12288
>> + fi
>>
>> # consume nearly all available space (leave ~512kB)
>> avail=`_get_available_space $SCRATCH_MNT`
>> - filesizekb=$((avail / 1024 - 512))
>> + filesizekb=$((avail / 1024 - $leave))
>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>> }
>>
>> --
>> 2.25.4
> .
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling
2021-06-15 3:25 ` [f2fs-dev] " Sun Ke
@ 2021-06-16 12:36 ` Chao Yu
-1 siblings, 0 replies; 27+ messages in thread
From: Chao Yu @ 2021-06-16 12:36 UTC (permalink / raw)
To: Sun Ke, fstests, guan, yuchao0, linux-f2fs-devel
On 2021/6/15 11:25, Sun Ke wrote:
>
>
> 在 2021/6/11 19:22, Sun Ke 写道:
>> In generic/50, touch 100 files, go down the fs immediately, Then umount
>> and set the disk readi-only. Try to mount it again without \-o
>> norecovery\, it should fail, because it can not recovery on a read-only
>> device. But f2fs mount successfully and the test fail.
>>
>> f2fs seems do not support metadata journaling.
It looks not correct.
FYI,
https://lkml.org/lkml/2021/3/23/75
Thanks,
>>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>>
>> I am not very sure if f2fs do not support metadata journaling.
>>
>> ###
>> before change
>> ###
>> [root@localhost xfstests-dev]# ./check tests/generic/050
>> FSTYP -- f2fs
>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
>> MKFS_OPTIONS -- /dev/sdb
>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>
>> generic/050 4s ... - output mismatch (see /root/work/xfstests-dev/results//generic/050.out.bad)
>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>> +++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-11 16:48:19.993000000 +0800
>> @@ -13,9 +13,7 @@
>> setting device read-only
>> mounting filesystem that needs recovery on a read-only device:
>> mount: device write-protected, mounting read-only
>> -mount: cannot mount device read-only
>> unmounting read-only filesystem
>> -umount: SCRATCH_DEV: not mounted
>> mounting filesystem with -o norecovery on a read-only device:
>> ...
>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out /root/work/xfstests-dev/results//generic/050.out.bad' to see the entire diff)
>> Ran: generic/050
>> Failures: generic/050
>> Failed 1 of 1 tests
>>
>> ###
>> after change
>> ###
>> [root@localhost xfstests-dev]# ./check tests/generic/050
>> FSTYP -- f2fs
>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
>> MKFS_OPTIONS -- /dev/sdb
>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>
>> generic/050 4s ... 4s
>> Ran: generic/050
>> Passed all 1 tests
>>
>>
>>
>> common/rc | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/common/rc b/common/rc
>> index a0aa7300..428b8b80 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
>> fi
>> case "$FSTYP" in
>> - ext2|vfat|msdos|udf|exfat|tmpfs)
>> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
>> echo "$FSTYP does not support metadata journaling"
>> return 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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling
@ 2021-06-16 12:36 ` Chao Yu
0 siblings, 0 replies; 27+ messages in thread
From: Chao Yu @ 2021-06-16 12:36 UTC (permalink / raw)
To: Sun Ke, fstests, guan, yuchao0, linux-f2fs-devel
On 2021/6/15 11:25, Sun Ke wrote:
>
>
> 在 2021/6/11 19:22, Sun Ke 写道:
>> In generic/50, touch 100 files, go down the fs immediately, Then umount
>> and set the disk readi-only. Try to mount it again without \-o
>> norecovery\, it should fail, because it can not recovery on a read-only
>> device. But f2fs mount successfully and the test fail.
>>
>> f2fs seems do not support metadata journaling.
It looks not correct.
FYI,
https://lkml.org/lkml/2021/3/23/75
Thanks,
>>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>>
>> I am not very sure if f2fs do not support metadata journaling.
>>
>> ###
>> before change
>> ###
>> [root@localhost xfstests-dev]# ./check tests/generic/050
>> FSTYP -- f2fs
>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
>> MKFS_OPTIONS -- /dev/sdb
>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>
>> generic/050 4s ... - output mismatch (see /root/work/xfstests-dev/results//generic/050.out.bad)
>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>> +++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-11 16:48:19.993000000 +0800
>> @@ -13,9 +13,7 @@
>> setting device read-only
>> mounting filesystem that needs recovery on a read-only device:
>> mount: device write-protected, mounting read-only
>> -mount: cannot mount device read-only
>> unmounting read-only filesystem
>> -umount: SCRATCH_DEV: not mounted
>> mounting filesystem with -o norecovery on a read-only device:
>> ...
>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out /root/work/xfstests-dev/results//generic/050.out.bad' to see the entire diff)
>> Ran: generic/050
>> Failures: generic/050
>> Failed 1 of 1 tests
>>
>> ###
>> after change
>> ###
>> [root@localhost xfstests-dev]# ./check tests/generic/050
>> FSTYP -- f2fs
>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
>> MKFS_OPTIONS -- /dev/sdb
>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>
>> generic/050 4s ... 4s
>> Ran: generic/050
>> Passed all 1 tests
>>
>>
>>
>> common/rc | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/common/rc b/common/rc
>> index a0aa7300..428b8b80 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
>> fi
>> case "$FSTYP" in
>> - ext2|vfat|msdos|udf|exfat|tmpfs)
>> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
>> echo "$FSTYP does not support metadata journaling"
>> return 1
>> ;;
>>
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/103: leave more space for f2fs
2021-06-15 3:28 ` [f2fs-dev] " Sun Ke
@ 2021-06-16 13:15 ` Chao Yu
-1 siblings, 0 replies; 27+ messages in thread
From: Chao Yu @ 2021-06-16 13:15 UTC (permalink / raw)
To: Sun Ke, linux-f2fs-devel; +Cc: fstests, guan, yuchao0
On 2021/6/15 11:28, Sun Ke wrote:
> to linux-f2fs-devel@lists.sourceforge.net
>
> 在 2021/6/11 19:22, Sun Ke 写道:
>> It failed on f2fs:
>> QA output created by 103
>> +fallocate: No space left on device
>> Silence is golden.
>> ...
>>
>> Try to leave ~512KB, but during the fallocate, f2fs will be filled.
>> Provide error prompt: "fallocate: No space left on device".
>>
>> Leave more space for f2fs.
>>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>> I add some test code
>> + df
>> avail=`_get_available_space $SCRATCH_MNT`
>> + echo "avail = ${avail}"
>> filesizekb=$((avail / 1024 - 512))
>> + echo "filesizekb = ${filesizekb}"
>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>> + df
>> }
>>
>> f2fs:
>> QA output created by 103
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch
>> +avail = 12316233728
>> +filesizekb = 12027060
>> +fallocate: No space left on device
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch
>> Silence is golden.
>>
>> xfs:
>> QA output created by 103
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch
>> +avail = 12750688256
>> +filesizekb = 12451332
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch
>> Silence is golden.
>>
>> ext4:
>> QA output created by 103
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch
>> +avail = 11912503296
>> +filesizekb = 11632792
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch
>> Silence is golden.
>>
>> after change (f2fs)
>> QA output created by 103
>> Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> /dev/sdb 12580864 12580396 468 100% /tmp/scratch
>> Silence is golden.
>>
>> tests/generic/103 | 10 +++++++++-
>> 1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/generic/103 b/tests/generic/103
>> index b22b0159623e..dfce3870781c 100755
>> --- a/tests/generic/103
>> +++ b/tests/generic/103
>> @@ -40,10 +40,18 @@ rm -f $seqres.full
>> _consume_freesp()
>> {
>> file=$1
>> + leave=512
>> +
>> + # Try to leave ~512KB, but during the fallocate, f2fs will be filled.
>> + # Provide error prompt: "fallocate: No space left on device". Leave
>> + # more space for f2fs.
>> + if [ $FSTYP == "f2fs" ]; then
>> + leave=12288
>> + fi
>> # consume nearly all available space (leave ~512kB)
>> avail=`_get_available_space $SCRATCH_MNT`
if [ $FSTYP == "f2fs" ]; then
left=$((left + avail / 1024000))
fi
f2fs uses index(radix) tree as mapping metadata, its space overhead
is about one thousandth of the data, so can you please try above
calculation?
Thanks,
>> - filesizekb=$((avail / 1024 - 512))
>> + filesizekb=$((avail / 1024 - $leave))
>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>> }
>>
>
>
> _______________________________________________
> 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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/103: leave more space for f2fs
@ 2021-06-16 13:15 ` Chao Yu
0 siblings, 0 replies; 27+ messages in thread
From: Chao Yu @ 2021-06-16 13:15 UTC (permalink / raw)
To: Sun Ke, linux-f2fs-devel; +Cc: guan, fstests
On 2021/6/15 11:28, Sun Ke wrote:
> to linux-f2fs-devel@lists.sourceforge.net
>
> 在 2021/6/11 19:22, Sun Ke 写道:
>> It failed on f2fs:
>> QA output created by 103
>> +fallocate: No space left on device
>> Silence is golden.
>> ...
>>
>> Try to leave ~512KB, but during the fallocate, f2fs will be filled.
>> Provide error prompt: "fallocate: No space left on device".
>>
>> Leave more space for f2fs.
>>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>> I add some test code
>> + df
>> avail=`_get_available_space $SCRATCH_MNT`
>> + echo "avail = ${avail}"
>> filesizekb=$((avail / 1024 - 512))
>> + echo "filesizekb = ${filesizekb}"
>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>> + df
>> }
>>
>> f2fs:
>> QA output created by 103
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch
>> +avail = 12316233728
>> +filesizekb = 12027060
>> +fallocate: No space left on device
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch
>> Silence is golden.
>>
>> xfs:
>> QA output created by 103
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch
>> +avail = 12750688256
>> +filesizekb = 12451332
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch
>> Silence is golden.
>>
>> ext4:
>> QA output created by 103
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch
>> +avail = 11912503296
>> +filesizekb = 11632792
>> +Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch
>> Silence is golden.
>>
>> after change (f2fs)
>> QA output created by 103
>> Filesystem 1K-blocks Used Available Use% Mounted on
>> ...
>> /dev/sdb 12580864 12580396 468 100% /tmp/scratch
>> Silence is golden.
>>
>> tests/generic/103 | 10 +++++++++-
>> 1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/generic/103 b/tests/generic/103
>> index b22b0159623e..dfce3870781c 100755
>> --- a/tests/generic/103
>> +++ b/tests/generic/103
>> @@ -40,10 +40,18 @@ rm -f $seqres.full
>> _consume_freesp()
>> {
>> file=$1
>> + leave=512
>> +
>> + # Try to leave ~512KB, but during the fallocate, f2fs will be filled.
>> + # Provide error prompt: "fallocate: No space left on device". Leave
>> + # more space for f2fs.
>> + if [ $FSTYP == "f2fs" ]; then
>> + leave=12288
>> + fi
>> # consume nearly all available space (leave ~512kB)
>> avail=`_get_available_space $SCRATCH_MNT`
if [ $FSTYP == "f2fs" ]; then
left=$((left + avail / 1024000))
fi
f2fs uses index(radix) tree as mapping metadata, its space overhead
is about one thousandth of the data, so can you please try above
calculation?
Thanks,
>> - filesizekb=$((avail / 1024 - 512))
>> + filesizekb=$((avail / 1024 - $leave))
>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>> }
>>
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/260: f2fs is also special
2021-06-15 3:29 ` [f2fs-dev] " Sun Ke
@ 2021-06-16 13:43 ` Chao Yu
-1 siblings, 0 replies; 27+ messages in thread
From: Chao Yu @ 2021-06-16 13:43 UTC (permalink / raw)
To: Sun Ke; +Cc: fstests, guan, yuchao0, linux-f2fs-devel
On 2021/6/15 11:29, Sun Ke wrote:
> to linux-f2fs-devel@lists.sourceforge.net
>
> 在 2021/6/11 19:22, Sun Ke 写道:
>> It seem that f2fs also special like btrfs.
>>
>> [+] Default length with start set (should succeed)
>> [+] Length beyond the end of fs (should succeed)
>> [+] Length beyond the end of fs with start set (should succeed)
>> +After the full fs discard 0 bytes were discarded however the file system is 12882804736 bytes long.
>> +It seems that fs logic handling len argument overflows
Well, the root cause is f2fs can tag a special flag TRIMMED_FLAG to
indicate the whole filesystem is trimmed, so after mkfs/fstrim(),
following fstrim() won't trim any block.
Can you please update commit message and add comments in script?
Thanks,
>>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>> I am not sure about that. o(╯□╰)o
>>
>> tests/generic/260 | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/generic/260 b/tests/generic/260
>> index 8021aa68..6bd861d2 100755
>> --- a/tests/generic/260
>> +++ b/tests/generic/260
>> @@ -100,7 +100,7 @@ fi
>> # It is because btrfs does not have not-yet-used parts of the device
>> # mapped and since we got here right after the mkfs, there is not
>> # enough free extents in the root tree.
>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
>> status=1
>> echo "After the full fs discard $bytes bytes were discarded"\
>> "however the file system is $(_math "$fssize*1024") bytes long."
>> @@ -160,7 +160,7 @@ _scratch_mount
>> # mapped and since we got here right after the mkfs, there is not
>> # enough free extents in the root tree.
>> bytes=$($FSTRIM_PROG -v -l$len $SCRATCH_MNT | _filter_fstrim)
>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
>> status=1
>> echo "It seems that fs logic handling len argument overflows"
>> fi
>>
>
>
> _______________________________________________
> 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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/260: f2fs is also special
@ 2021-06-16 13:43 ` Chao Yu
0 siblings, 0 replies; 27+ messages in thread
From: Chao Yu @ 2021-06-16 13:43 UTC (permalink / raw)
To: Sun Ke; +Cc: guan, fstests, linux-f2fs-devel
On 2021/6/15 11:29, Sun Ke wrote:
> to linux-f2fs-devel@lists.sourceforge.net
>
> 在 2021/6/11 19:22, Sun Ke 写道:
>> It seem that f2fs also special like btrfs.
>>
>> [+] Default length with start set (should succeed)
>> [+] Length beyond the end of fs (should succeed)
>> [+] Length beyond the end of fs with start set (should succeed)
>> +After the full fs discard 0 bytes were discarded however the file system is 12882804736 bytes long.
>> +It seems that fs logic handling len argument overflows
Well, the root cause is f2fs can tag a special flag TRIMMED_FLAG to
indicate the whole filesystem is trimmed, so after mkfs/fstrim(),
following fstrim() won't trim any block.
Can you please update commit message and add comments in script?
Thanks,
>>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>> I am not sure about that. o(╯□╰)o
>>
>> tests/generic/260 | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/generic/260 b/tests/generic/260
>> index 8021aa68..6bd861d2 100755
>> --- a/tests/generic/260
>> +++ b/tests/generic/260
>> @@ -100,7 +100,7 @@ fi
>> # It is because btrfs does not have not-yet-used parts of the device
>> # mapped and since we got here right after the mkfs, there is not
>> # enough free extents in the root tree.
>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
>> status=1
>> echo "After the full fs discard $bytes bytes were discarded"\
>> "however the file system is $(_math "$fssize*1024") bytes long."
>> @@ -160,7 +160,7 @@ _scratch_mount
>> # mapped and since we got here right after the mkfs, there is not
>> # enough free extents in the root tree.
>> bytes=$($FSTRIM_PROG -v -l$len $SCRATCH_MNT | _filter_fstrim)
>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] && [ $FSTYP != "f2fs" ]; then
>> status=1
>> echo "It seems that fs logic handling len argument overflows"
>> fi
>>
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling
2021-06-16 12:36 ` Chao Yu
@ 2021-06-17 3:45 ` Sun Ke
-1 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-17 3:45 UTC (permalink / raw)
To: Chao Yu, fstests, guan, yuchao0, linux-f2fs-devel
在 2021/6/16 20:36, Chao Yu 写道:
> On 2021/6/15 11:25, Sun Ke wrote:
>>
>>
>> 在 2021/6/11 19:22, Sun Ke 写道:
>>> In generic/50, touch 100 files, go down the fs immediately, Then umount
>>> and set the disk readi-only. Try to mount it again without \-o
>>> norecovery\, it should fail, because it can not recovery on a read-only
>>> device. But f2fs mount successfully and the test fail.
>>>
>>> f2fs seems do not support metadata journaling.
>
> It looks not correct.
>
> FYI,
>
> https://lkml.org/lkml/2021/3/23/75
>
> Thanks,
Your patch should fix this bug, but it still fail in 5.13.0-rc5.
[root@localhost xfstests-dev]# ./check tests/generic/050
FSTYP -- f2fs
PLATFORM -- Linux/x86_64 localhost 5.13.0-rc5 #2 SMP Wed Jun 16
20:36:54 CST 2021
MKFS_OPTIONS -- /dev/sdb
MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
generic/050 3s ... - output mismatch (see
/root/work/xfstests-dev/results//generic/050.out.bad)
--- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
+++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-17
11:40:26.107000000 +0800
@@ -13,9 +13,7 @@
setting device read-only
mounting filesystem that needs recovery on a read-only device:
mount: device write-protected, mounting read-only
-mount: cannot mount device read-only
unmounting read-only filesystem
-umount: SCRATCH_DEV: not mounted
mounting filesystem with -o norecovery on a read-only device:
...
(Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out
/root/work/xfstests-dev/results//generic/050.out.bad' to see the entire
diff)
Ran: generic/050
Failures: generic/050
Failed 1 of 1 tests
Thanks,
Sun Ke
>
>>>
>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>> ---
>>>
>>> I am not very sure if f2fs do not support metadata journaling.
>>>
>>> ###
>>> before change
>>> ###
>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>> FSTYP -- f2fs
>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8
>>> SMP Tue Jun 8 11:09:37 CST 2021
>>> MKFS_OPTIONS -- /dev/sdb
>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>
>>> generic/050 4s ... - output mismatch (see
>>> /root/work/xfstests-dev/results//generic/050.out.bad)
>>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>>> +++ /root/work/xfstests-dev/results//generic/050.out.bad
>>> 2021-06-11 16:48:19.993000000 +0800
>>> @@ -13,9 +13,7 @@
>>> setting device read-only
>>> mounting filesystem that needs recovery on a read-only device:
>>> mount: device write-protected, mounting read-only
>>> -mount: cannot mount device read-only
>>> unmounting read-only filesystem
>>> -umount: SCRATCH_DEV: not mounted
>>> mounting filesystem with -o norecovery on a read-only device:
>>> ...
>>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out
>>> /root/work/xfstests-dev/results//generic/050.out.bad' to see the
>>> entire diff)
>>> Ran: generic/050
>>> Failures: generic/050
>>> Failed 1 of 1 tests
>>>
>>> ###
>>> after change
>>> ###
>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>> FSTYP -- f2fs
>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8
>>> SMP Tue Jun 8 11:09:37 CST 2021
>>> MKFS_OPTIONS -- /dev/sdb
>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>
>>> generic/050 4s ... 4s
>>> Ran: generic/050
>>> Passed all 1 tests
>>>
>>>
>>>
>>> common/rc | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/common/rc b/common/rc
>>> index a0aa7300..428b8b80 100644
>>> --- a/common/rc
>>> +++ b/common/rc
>>> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
>>> fi
>>> case "$FSTYP" in
>>> - ext2|vfat|msdos|udf|exfat|tmpfs)
>>> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
>>> echo "$FSTYP does not support metadata journaling"
>>> return 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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling
@ 2021-06-17 3:45 ` Sun Ke
0 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-17 3:45 UTC (permalink / raw)
To: Chao Yu, fstests, guan, yuchao0, linux-f2fs-devel
在 2021/6/16 20:36, Chao Yu 写道:
> On 2021/6/15 11:25, Sun Ke wrote:
>>
>>
>> 在 2021/6/11 19:22, Sun Ke 写道:
>>> In generic/50, touch 100 files, go down the fs immediately, Then umount
>>> and set the disk readi-only. Try to mount it again without \-o
>>> norecovery\, it should fail, because it can not recovery on a read-only
>>> device. But f2fs mount successfully and the test fail.
>>>
>>> f2fs seems do not support metadata journaling.
>
> It looks not correct.
>
> FYI,
>
> https://lkml.org/lkml/2021/3/23/75
>
> Thanks,
Your patch should fix this bug, but it still fail in 5.13.0-rc5.
[root@localhost xfstests-dev]# ./check tests/generic/050
FSTYP -- f2fs
PLATFORM -- Linux/x86_64 localhost 5.13.0-rc5 #2 SMP Wed Jun 16
20:36:54 CST 2021
MKFS_OPTIONS -- /dev/sdb
MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
generic/050 3s ... - output mismatch (see
/root/work/xfstests-dev/results//generic/050.out.bad)
--- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
+++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-17
11:40:26.107000000 +0800
@@ -13,9 +13,7 @@
setting device read-only
mounting filesystem that needs recovery on a read-only device:
mount: device write-protected, mounting read-only
-mount: cannot mount device read-only
unmounting read-only filesystem
-umount: SCRATCH_DEV: not mounted
mounting filesystem with -o norecovery on a read-only device:
...
(Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out
/root/work/xfstests-dev/results//generic/050.out.bad' to see the entire
diff)
Ran: generic/050
Failures: generic/050
Failed 1 of 1 tests
Thanks,
Sun Ke
>
>>>
>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>> ---
>>>
>>> I am not very sure if f2fs do not support metadata journaling.
>>>
>>> ###
>>> before change
>>> ###
>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>> FSTYP -- f2fs
>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8
>>> SMP Tue Jun 8 11:09:37 CST 2021
>>> MKFS_OPTIONS -- /dev/sdb
>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>
>>> generic/050 4s ... - output mismatch (see
>>> /root/work/xfstests-dev/results//generic/050.out.bad)
>>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>>> +++ /root/work/xfstests-dev/results//generic/050.out.bad
>>> 2021-06-11 16:48:19.993000000 +0800
>>> @@ -13,9 +13,7 @@
>>> setting device read-only
>>> mounting filesystem that needs recovery on a read-only device:
>>> mount: device write-protected, mounting read-only
>>> -mount: cannot mount device read-only
>>> unmounting read-only filesystem
>>> -umount: SCRATCH_DEV: not mounted
>>> mounting filesystem with -o norecovery on a read-only device:
>>> ...
>>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out
>>> /root/work/xfstests-dev/results//generic/050.out.bad' to see the
>>> entire diff)
>>> Ran: generic/050
>>> Failures: generic/050
>>> Failed 1 of 1 tests
>>>
>>> ###
>>> after change
>>> ###
>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>> FSTYP -- f2fs
>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8
>>> SMP Tue Jun 8 11:09:37 CST 2021
>>> MKFS_OPTIONS -- /dev/sdb
>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>
>>> generic/050 4s ... 4s
>>> Ran: generic/050
>>> Passed all 1 tests
>>>
>>>
>>>
>>> common/rc | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/common/rc b/common/rc
>>> index a0aa7300..428b8b80 100644
>>> --- a/common/rc
>>> +++ b/common/rc
>>> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
>>> fi
>>> case "$FSTYP" in
>>> - ext2|vfat|msdos|udf|exfat|tmpfs)
>>> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
>>> echo "$FSTYP does not support metadata journaling"
>>> return 1
>>> ;;
>>>
>>
>>
>> _______________________________________________
>> Linux-f2fs-devel mailing list
>> Linux-f2fs-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> .
_______________________________________________
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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/103: leave more space for f2fs
2021-06-16 13:15 ` Chao Yu
@ 2021-06-17 6:22 ` Sun Ke
-1 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-17 6:22 UTC (permalink / raw)
To: Chao Yu, linux-f2fs-devel; +Cc: fstests, guan, yuchao0
在 2021/6/16 21:15, Chao Yu 写道:
> On 2021/6/15 11:28, Sun Ke wrote:
>> to linux-f2fs-devel@lists.sourceforge.net
>>
>> 在 2021/6/11 19:22, Sun Ke 写道:
>>> It failed on f2fs:
>>> QA output created by 103
>>> +fallocate: No space left on device
>>> Silence is golden.
>>> ...
>>>
>>> Try to leave ~512KB, but during the fallocate, f2fs will be filled.
>>> Provide error prompt: "fallocate: No space left on device".
>>>
>>> Leave more space for f2fs.
>>>
>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>> ---
>>> I add some test code
>>> + df
>>> avail=`_get_available_space $SCRATCH_MNT`
>>> + echo "avail = ${avail}"
>>> filesizekb=$((avail / 1024 - 512))
>>> + echo "filesizekb = ${filesizekb}"
>>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>>> + df
>>> }
>>>
>>> f2fs:
>>> QA output created by 103
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch
>>> +avail = 12316233728
>>> +filesizekb = 12027060
>>> +fallocate: No space left on device
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch
>>> Silence is golden.
>>>
>>> xfs:
>>> QA output created by 103
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch
>>> +avail = 12750688256
>>> +filesizekb = 12451332
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch
>>> Silence is golden.
>>>
>>> ext4:
>>> QA output created by 103
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch
>>> +avail = 11912503296
>>> +filesizekb = 11632792
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch
>>> Silence is golden.
>>>
>>> after change (f2fs)
>>> QA output created by 103
>>> Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> /dev/sdb 12580864 12580396 468 100% /tmp/scratch
>>> Silence is golden.
>>>
>>> tests/generic/103 | 10 +++++++++-
>>> 1 file changed, 9 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tests/generic/103 b/tests/generic/103
>>> index b22b0159623e..dfce3870781c 100755
>>> --- a/tests/generic/103
>>> +++ b/tests/generic/103
>>> @@ -40,10 +40,18 @@ rm -f $seqres.full
>>> _consume_freesp()
>>> {
>>> file=$1
>>> + leave=512
>>> +
>>> + # Try to leave ~512KB, but during the fallocate, f2fs will be
>>> filled.
>>> + # Provide error prompt: "fallocate: No space left on device". Leave
>>> + # more space for f2fs.
>>> + if [ $FSTYP == "f2fs" ]; then
>>> + leave=12288
>>> + fi
>>> # consume nearly all available space (leave ~512kB)
>>> avail=`_get_available_space $SCRATCH_MNT`
>
> if [ $FSTYP == "f2fs" ]; then
> left=$((left + avail / 1024000))
> fi
>
> f2fs uses index(radix) tree as mapping metadata, its space overhead
> is about one thousandth of the data, so can you please try above
> calculation?
>
> Thanks,
I have tried your calculation, it works. I will send v2 patch.
Thanks,
Sun Ke
>
>>> - filesizekb=$((avail / 1024 - 512))
>>> + filesizekb=$((avail / 1024 - $leave))
>>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>>> }
>>>
>>
>>
>> _______________________________________________
>> 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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/103: leave more space for f2fs
@ 2021-06-17 6:22 ` Sun Ke
0 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-17 6:22 UTC (permalink / raw)
To: Chao Yu, linux-f2fs-devel; +Cc: guan, fstests
在 2021/6/16 21:15, Chao Yu 写道:
> On 2021/6/15 11:28, Sun Ke wrote:
>> to linux-f2fs-devel@lists.sourceforge.net
>>
>> 在 2021/6/11 19:22, Sun Ke 写道:
>>> It failed on f2fs:
>>> QA output created by 103
>>> +fallocate: No space left on device
>>> Silence is golden.
>>> ...
>>>
>>> Try to leave ~512KB, but during the fallocate, f2fs will be filled.
>>> Provide error prompt: "fallocate: No space left on device".
>>>
>>> Leave more space for f2fs.
>>>
>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>> ---
>>> I add some test code
>>> + df
>>> avail=`_get_available_space $SCRATCH_MNT`
>>> + echo "avail = ${avail}"
>>> filesizekb=$((avail / 1024 - 512))
>>> + echo "filesizekb = ${filesizekb}"
>>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>>> + df
>>> }
>>>
>>> f2fs:
>>> QA output created by 103
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch
>>> +avail = 12316233728
>>> +filesizekb = 12027060
>>> +fallocate: No space left on device
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch
>>> Silence is golden.
>>>
>>> xfs:
>>> QA output created by 103
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch
>>> +avail = 12750688256
>>> +filesizekb = 12451332
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch
>>> Silence is golden.
>>>
>>> ext4:
>>> QA output created by 103
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch
>>> +avail = 11912503296
>>> +filesizekb = 11632792
>>> +Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch
>>> Silence is golden.
>>>
>>> after change (f2fs)
>>> QA output created by 103
>>> Filesystem 1K-blocks Used Available Use% Mounted on
>>> ...
>>> /dev/sdb 12580864 12580396 468 100% /tmp/scratch
>>> Silence is golden.
>>>
>>> tests/generic/103 | 10 +++++++++-
>>> 1 file changed, 9 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tests/generic/103 b/tests/generic/103
>>> index b22b0159623e..dfce3870781c 100755
>>> --- a/tests/generic/103
>>> +++ b/tests/generic/103
>>> @@ -40,10 +40,18 @@ rm -f $seqres.full
>>> _consume_freesp()
>>> {
>>> file=$1
>>> + leave=512
>>> +
>>> + # Try to leave ~512KB, but during the fallocate, f2fs will be
>>> filled.
>>> + # Provide error prompt: "fallocate: No space left on device". Leave
>>> + # more space for f2fs.
>>> + if [ $FSTYP == "f2fs" ]; then
>>> + leave=12288
>>> + fi
>>> # consume nearly all available space (leave ~512kB)
>>> avail=`_get_available_space $SCRATCH_MNT`
>
> if [ $FSTYP == "f2fs" ]; then
> left=$((left + avail / 1024000))
> fi
>
> f2fs uses index(radix) tree as mapping metadata, its space overhead
> is about one thousandth of the data, so can you please try above
> calculation?
>
> Thanks,
I have tried your calculation, it works. I will send v2 patch.
Thanks,
Sun Ke
>
>>> - filesizekb=$((avail / 1024 - 512))
>>> + filesizekb=$((avail / 1024 - $leave))
>>> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
>>> }
>>>
>>
>>
>> _______________________________________________
>> Linux-f2fs-devel mailing list
>> Linux-f2fs-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> .
_______________________________________________
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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/260: f2fs is also special
2021-06-16 13:43 ` Chao Yu
@ 2021-06-17 6:38 ` Sun Ke
-1 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-17 6:38 UTC (permalink / raw)
To: Chao Yu; +Cc: fstests, guan, yuchao0, linux-f2fs-devel
在 2021/6/16 21:43, Chao Yu 写道:
> On 2021/6/15 11:29, Sun Ke wrote:
>> to linux-f2fs-devel@lists.sourceforge.net
>>
>> 在 2021/6/11 19:22, Sun Ke 写道:
>>> It seem that f2fs also special like btrfs.
>>>
>>> [+] Default length with start set (should succeed)
>>> [+] Length beyond the end of fs (should succeed)
>>> [+] Length beyond the end of fs with start set (should succeed)
>>> +After the full fs discard 0 bytes were discarded however the file
>>> system is 12882804736 bytes long.
>>> +It seems that fs logic handling len argument overflows
>
> Well, the root cause is f2fs can tag a special flag TRIMMED_FLAG to
> indicate the whole filesystem is trimmed, so after mkfs/fstrim(),
> following fstrim() won't trim any block.
>
> Can you please update commit message and add comments in script?
>
> Thanks,
Glad to do that.
Thanks,
Sun Ke
>
>>>
>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>> ---
>>> I am not sure about that. o(╯□╰)o
>>>
>>> tests/generic/260 | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tests/generic/260 b/tests/generic/260
>>> index 8021aa68..6bd861d2 100755
>>> --- a/tests/generic/260
>>> +++ b/tests/generic/260
>>> @@ -100,7 +100,7 @@ fi
>>> # It is because btrfs does not have not-yet-used parts of the device
>>> # mapped and since we got here right after the mkfs, there is not
>>> # enough free extents in the root tree.
>>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] &&
>>> [ $FSTYP != "f2fs" ]; then
>>> status=1
>>> echo "After the full fs discard $bytes bytes were discarded"\
>>> "however the file system is $(_math "$fssize*1024") bytes
>>> long."
>>> @@ -160,7 +160,7 @@ _scratch_mount
>>> # mapped and since we got here right after the mkfs, there is not
>>> # enough free extents in the root tree.
>>> bytes=$($FSTRIM_PROG -v -l$len $SCRATCH_MNT | _filter_fstrim)
>>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] &&
>>> [ $FSTYP != "f2fs" ]; then
>>> status=1
>>> echo "It seems that fs logic handling len argument overflows"
>>> fi
>>>
>>
>>
>> _______________________________________________
>> 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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/260: f2fs is also special
@ 2021-06-17 6:38 ` Sun Ke
0 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-17 6:38 UTC (permalink / raw)
To: Chao Yu; +Cc: guan, fstests, linux-f2fs-devel
在 2021/6/16 21:43, Chao Yu 写道:
> On 2021/6/15 11:29, Sun Ke wrote:
>> to linux-f2fs-devel@lists.sourceforge.net
>>
>> 在 2021/6/11 19:22, Sun Ke 写道:
>>> It seem that f2fs also special like btrfs.
>>>
>>> [+] Default length with start set (should succeed)
>>> [+] Length beyond the end of fs (should succeed)
>>> [+] Length beyond the end of fs with start set (should succeed)
>>> +After the full fs discard 0 bytes were discarded however the file
>>> system is 12882804736 bytes long.
>>> +It seems that fs logic handling len argument overflows
>
> Well, the root cause is f2fs can tag a special flag TRIMMED_FLAG to
> indicate the whole filesystem is trimmed, so after mkfs/fstrim(),
> following fstrim() won't trim any block.
>
> Can you please update commit message and add comments in script?
>
> Thanks,
Glad to do that.
Thanks,
Sun Ke
>
>>>
>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>> ---
>>> I am not sure about that. o(╯□╰)o
>>>
>>> tests/generic/260 | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tests/generic/260 b/tests/generic/260
>>> index 8021aa68..6bd861d2 100755
>>> --- a/tests/generic/260
>>> +++ b/tests/generic/260
>>> @@ -100,7 +100,7 @@ fi
>>> # It is because btrfs does not have not-yet-used parts of the device
>>> # mapped and since we got here right after the mkfs, there is not
>>> # enough free extents in the root tree.
>>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] &&
>>> [ $FSTYP != "f2fs" ]; then
>>> status=1
>>> echo "After the full fs discard $bytes bytes were discarded"\
>>> "however the file system is $(_math "$fssize*1024") bytes
>>> long."
>>> @@ -160,7 +160,7 @@ _scratch_mount
>>> # mapped and since we got here right after the mkfs, there is not
>>> # enough free extents in the root tree.
>>> bytes=$($FSTRIM_PROG -v -l$len $SCRATCH_MNT | _filter_fstrim)
>>> -if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ]; then
>>> +if [ $bytes -le $(_math "$fssize*512") ] && [ $FSTYP != "btrfs" ] &&
>>> [ $FSTYP != "f2fs" ]; then
>>> status=1
>>> echo "It seems that fs logic handling len argument overflows"
>>> fi
>>>
>>
>>
>> _______________________________________________
>> Linux-f2fs-devel mailing list
>> Linux-f2fs-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> .
_______________________________________________
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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling
2021-06-17 3:45 ` Sun Ke
@ 2021-06-17 23:46 ` Chao Yu
-1 siblings, 0 replies; 27+ messages in thread
From: Chao Yu @ 2021-06-17 23:46 UTC (permalink / raw)
To: Sun Ke; +Cc: fstests, guan, yuchao0, linux-f2fs-devel
On 2021/6/17 11:45, Sun Ke wrote:
>
>
> 在 2021/6/16 20:36, Chao Yu 写道:
>> On 2021/6/15 11:25, Sun Ke wrote:
>>>
>>>
>>> 在 2021/6/11 19:22, Sun Ke 写道:
>>>> In generic/50, touch 100 files, go down the fs immediately, Then umount
>>>> and set the disk readi-only. Try to mount it again without \-o
>>>> norecovery\, it should fail, because it can not recovery on a read-only
>>>> device. But f2fs mount successfully and the test fail.
>>>>
>>>> f2fs seems do not support metadata journaling.
>>
>> It looks not correct.
>>
>> FYI,
>>
>> https://lkml.org/lkml/2021/3/23/75
>>
>> Thanks,
> Your patch should fix this bug, but it still fail in 5.13.0-rc5.
It's due to that patch was not merged, please check details in that thread.
Thanks,
>
> [root@localhost xfstests-dev]# ./check tests/generic/050
> FSTYP -- f2fs
> PLATFORM -- Linux/x86_64 localhost 5.13.0-rc5 #2 SMP Wed Jun 16 20:36:54 CST 2021
> MKFS_OPTIONS -- /dev/sdb
> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>
> generic/050 3s ... - output mismatch (see /root/work/xfstests-dev/results//generic/050.out.bad)
> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
> +++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-17 11:40:26.107000000 +0800
> @@ -13,9 +13,7 @@
> setting device read-only
> mounting filesystem that needs recovery on a read-only device:
> mount: device write-protected, mounting read-only
> -mount: cannot mount device read-only
> unmounting read-only filesystem
> -umount: SCRATCH_DEV: not mounted
> mounting filesystem with -o norecovery on a read-only device:
> ...
> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out /root/work/xfstests-dev/results//generic/050.out.bad' to see the entire diff)
> Ran: generic/050
> Failures: generic/050
> Failed 1 of 1 tests
>
> Thanks,
> Sun Ke
>>
>>>>
>>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>>> ---
>>>>
>>>> I am not very sure if f2fs do not support metadata journaling.
>>>>
>>>> ###
>>>> before change
>>>> ###
>>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>>> FSTYP -- f2fs
>>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
>>>> MKFS_OPTIONS -- /dev/sdb
>>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>>
>>>> generic/050 4s ... - output mismatch (see /root/work/xfstests-dev/results//generic/050.out.bad)
>>>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>>>> +++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-11 16:48:19.993000000 +0800
>>>> @@ -13,9 +13,7 @@
>>>> setting device read-only
>>>> mounting filesystem that needs recovery on a read-only device:
>>>> mount: device write-protected, mounting read-only
>>>> -mount: cannot mount device read-only
>>>> unmounting read-only filesystem
>>>> -umount: SCRATCH_DEV: not mounted
>>>> mounting filesystem with -o norecovery on a read-only device:
>>>> ...
>>>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out /root/work/xfstests-dev/results//generic/050.out.bad' to see the entire diff)
>>>> Ran: generic/050
>>>> Failures: generic/050
>>>> Failed 1 of 1 tests
>>>>
>>>> ###
>>>> after change
>>>> ###
>>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>>> FSTYP -- f2fs
>>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
>>>> MKFS_OPTIONS -- /dev/sdb
>>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>>
>>>> generic/050 4s ... 4s
>>>> Ran: generic/050
>>>> Passed all 1 tests
>>>>
>>>>
>>>>
>>>> common/rc | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/common/rc b/common/rc
>>>> index a0aa7300..428b8b80 100644
>>>> --- a/common/rc
>>>> +++ b/common/rc
>>>> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
>>>> fi
>>>> case "$FSTYP" in
>>>> - ext2|vfat|msdos|udf|exfat|tmpfs)
>>>> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
>>>> echo "$FSTYP does not support metadata journaling"
>>>> return 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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling
@ 2021-06-17 23:46 ` Chao Yu
0 siblings, 0 replies; 27+ messages in thread
From: Chao Yu @ 2021-06-17 23:46 UTC (permalink / raw)
To: Sun Ke; +Cc: guan, fstests, linux-f2fs-devel
On 2021/6/17 11:45, Sun Ke wrote:
>
>
> 在 2021/6/16 20:36, Chao Yu 写道:
>> On 2021/6/15 11:25, Sun Ke wrote:
>>>
>>>
>>> 在 2021/6/11 19:22, Sun Ke 写道:
>>>> In generic/50, touch 100 files, go down the fs immediately, Then umount
>>>> and set the disk readi-only. Try to mount it again without \-o
>>>> norecovery\, it should fail, because it can not recovery on a read-only
>>>> device. But f2fs mount successfully and the test fail.
>>>>
>>>> f2fs seems do not support metadata journaling.
>>
>> It looks not correct.
>>
>> FYI,
>>
>> https://lkml.org/lkml/2021/3/23/75
>>
>> Thanks,
> Your patch should fix this bug, but it still fail in 5.13.0-rc5.
It's due to that patch was not merged, please check details in that thread.
Thanks,
>
> [root@localhost xfstests-dev]# ./check tests/generic/050
> FSTYP -- f2fs
> PLATFORM -- Linux/x86_64 localhost 5.13.0-rc5 #2 SMP Wed Jun 16 20:36:54 CST 2021
> MKFS_OPTIONS -- /dev/sdb
> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>
> generic/050 3s ... - output mismatch (see /root/work/xfstests-dev/results//generic/050.out.bad)
> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
> +++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-17 11:40:26.107000000 +0800
> @@ -13,9 +13,7 @@
> setting device read-only
> mounting filesystem that needs recovery on a read-only device:
> mount: device write-protected, mounting read-only
> -mount: cannot mount device read-only
> unmounting read-only filesystem
> -umount: SCRATCH_DEV: not mounted
> mounting filesystem with -o norecovery on a read-only device:
> ...
> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out /root/work/xfstests-dev/results//generic/050.out.bad' to see the entire diff)
> Ran: generic/050
> Failures: generic/050
> Failed 1 of 1 tests
>
> Thanks,
> Sun Ke
>>
>>>>
>>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>>> ---
>>>>
>>>> I am not very sure if f2fs do not support metadata journaling.
>>>>
>>>> ###
>>>> before change
>>>> ###
>>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>>> FSTYP -- f2fs
>>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
>>>> MKFS_OPTIONS -- /dev/sdb
>>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>>
>>>> generic/050 4s ... - output mismatch (see /root/work/xfstests-dev/results//generic/050.out.bad)
>>>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>>>> +++ /root/work/xfstests-dev/results//generic/050.out.bad 2021-06-11 16:48:19.993000000 +0800
>>>> @@ -13,9 +13,7 @@
>>>> setting device read-only
>>>> mounting filesystem that needs recovery on a read-only device:
>>>> mount: device write-protected, mounting read-only
>>>> -mount: cannot mount device read-only
>>>> unmounting read-only filesystem
>>>> -umount: SCRATCH_DEV: not mounted
>>>> mounting filesystem with -o norecovery on a read-only device:
>>>> ...
>>>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out /root/work/xfstests-dev/results//generic/050.out.bad' to see the entire diff)
>>>> Ran: generic/050
>>>> Failures: generic/050
>>>> Failed 1 of 1 tests
>>>>
>>>> ###
>>>> after change
>>>> ###
>>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>>> FSTYP -- f2fs
>>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8 SMP Tue Jun 8 11:09:37 CST 2021
>>>> MKFS_OPTIONS -- /dev/sdb
>>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>>
>>>> generic/050 4s ... 4s
>>>> Ran: generic/050
>>>> Passed all 1 tests
>>>>
>>>>
>>>>
>>>> common/rc | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/common/rc b/common/rc
>>>> index a0aa7300..428b8b80 100644
>>>> --- a/common/rc
>>>> +++ b/common/rc
>>>> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
>>>> fi
>>>> case "$FSTYP" in
>>>> - ext2|vfat|msdos|udf|exfat|tmpfs)
>>>> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
>>>> echo "$FSTYP does not support metadata journaling"
>>>> return 1
>>>> ;;
>>>>
>>>
>>>
>>> _______________________________________________
>>> Linux-f2fs-devel mailing list
>>> Linux-f2fs-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>> .
_______________________________________________
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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling
2021-06-17 23:46 ` Chao Yu
@ 2021-06-18 2:03 ` Sun Ke
-1 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-18 2:03 UTC (permalink / raw)
To: Chao Yu; +Cc: fstests, guan, yuchao0, linux-f2fs-devel
在 2021/6/18 7:46, Chao Yu 写道:
> On 2021/6/17 11:45, Sun Ke wrote:
>>
>>
>> 在 2021/6/16 20:36, Chao Yu 写道:
>>> On 2021/6/15 11:25, Sun Ke wrote:
>>>>
>>>>
>>>> 在 2021/6/11 19:22, Sun Ke 写道:
>>>>> In generic/50, touch 100 files, go down the fs immediately, Then
>>>>> umount
>>>>> and set the disk readi-only. Try to mount it again without \-o
>>>>> norecovery\, it should fail, because it can not recovery on a
>>>>> read-only
>>>>> device. But f2fs mount successfully and the test fail.
>>>>>
>>>>> f2fs seems do not support metadata journaling.
>>>
>>> It looks not correct.
>>>
>>> FYI,
>>>
>>> https://lkml.org/lkml/2021/3/23/75
>>>
>>> Thanks,
>> Your patch should fix this bug, but it still fail in 5.13.0-rc5.
>
> It's due to that patch was not merged, please check details in that thread.
>
> Thanks,
CP_UMOUNT_FLAG decide if it need to recovery. Without your patch, it
only print the waring message and both goto reset_checkpoint. I think I
have got the root reason.
Thanks,
Sun Ke
>
>>
>> [root@localhost xfstests-dev]# ./check tests/generic/050
>> FSTYP -- f2fs
>> PLATFORM -- Linux/x86_64 localhost 5.13.0-rc5 #2 SMP Wed Jun 16
>> 20:36:54 CST 2021
>> MKFS_OPTIONS -- /dev/sdb
>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>
>> generic/050 3s ... - output mismatch (see
>> /root/work/xfstests-dev/results//generic/050.out.bad)
>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>> +++ /root/work/xfstests-dev/results//generic/050.out.bad
>> 2021-06-17 11:40:26.107000000 +0800
>> @@ -13,9 +13,7 @@
>> setting device read-only
>> mounting filesystem that needs recovery on a read-only device:
>> mount: device write-protected, mounting read-only
>> -mount: cannot mount device read-only
>> unmounting read-only filesystem
>> -umount: SCRATCH_DEV: not mounted
>> mounting filesystem with -o norecovery on a read-only device:
>> ...
>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out
>> /root/work/xfstests-dev/results//generic/050.out.bad' to see the
>> entire diff)
>> Ran: generic/050
>> Failures: generic/050
>> Failed 1 of 1 tests
>>
>> Thanks,
>> Sun Ke
>>>
>>>>>
>>>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>>>> ---
>>>>>
>>>>> I am not very sure if f2fs do not support metadata journaling.
>>>>>
>>>>> ###
>>>>> before change
>>>>> ###
>>>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>>>> FSTYP -- f2fs
>>>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8
>>>>> SMP Tue Jun 8 11:09:37 CST 2021
>>>>> MKFS_OPTIONS -- /dev/sdb
>>>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>>>
>>>>> generic/050 4s ... - output mismatch (see
>>>>> /root/work/xfstests-dev/results//generic/050.out.bad)
>>>>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>>>>> +++ /root/work/xfstests-dev/results//generic/050.out.bad
>>>>> 2021-06-11 16:48:19.993000000 +0800
>>>>> @@ -13,9 +13,7 @@
>>>>> setting device read-only
>>>>> mounting filesystem that needs recovery on a read-only device:
>>>>> mount: device write-protected, mounting read-only
>>>>> -mount: cannot mount device read-only
>>>>> unmounting read-only filesystem
>>>>> -umount: SCRATCH_DEV: not mounted
>>>>> mounting filesystem with -o norecovery on a read-only device:
>>>>> ...
>>>>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out
>>>>> /root/work/xfstests-dev/results//generic/050.out.bad' to see the
>>>>> entire diff)
>>>>> Ran: generic/050
>>>>> Failures: generic/050
>>>>> Failed 1 of 1 tests
>>>>>
>>>>> ###
>>>>> after change
>>>>> ###
>>>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>>>> FSTYP -- f2fs
>>>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8
>>>>> SMP Tue Jun 8 11:09:37 CST 2021
>>>>> MKFS_OPTIONS -- /dev/sdb
>>>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>>>
>>>>> generic/050 4s ... 4s
>>>>> Ran: generic/050
>>>>> Passed all 1 tests
>>>>>
>>>>>
>>>>>
>>>>> common/rc | 2 +-
>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/common/rc b/common/rc
>>>>> index a0aa7300..428b8b80 100644
>>>>> --- a/common/rc
>>>>> +++ b/common/rc
>>>>> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
>>>>> fi
>>>>> case "$FSTYP" in
>>>>> - ext2|vfat|msdos|udf|exfat|tmpfs)
>>>>> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
>>>>> echo "$FSTYP does not support metadata journaling"
>>>>> return 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] 27+ messages in thread
* Re: [f2fs-dev] [PATCH] common/rc: f2fs do not support metadata journaling
@ 2021-06-18 2:03 ` Sun Ke
0 siblings, 0 replies; 27+ messages in thread
From: Sun Ke @ 2021-06-18 2:03 UTC (permalink / raw)
To: Chao Yu; +Cc: guan, fstests, linux-f2fs-devel
在 2021/6/18 7:46, Chao Yu 写道:
> On 2021/6/17 11:45, Sun Ke wrote:
>>
>>
>> 在 2021/6/16 20:36, Chao Yu 写道:
>>> On 2021/6/15 11:25, Sun Ke wrote:
>>>>
>>>>
>>>> 在 2021/6/11 19:22, Sun Ke 写道:
>>>>> In generic/50, touch 100 files, go down the fs immediately, Then
>>>>> umount
>>>>> and set the disk readi-only. Try to mount it again without \-o
>>>>> norecovery\, it should fail, because it can not recovery on a
>>>>> read-only
>>>>> device. But f2fs mount successfully and the test fail.
>>>>>
>>>>> f2fs seems do not support metadata journaling.
>>>
>>> It looks not correct.
>>>
>>> FYI,
>>>
>>> https://lkml.org/lkml/2021/3/23/75
>>>
>>> Thanks,
>> Your patch should fix this bug, but it still fail in 5.13.0-rc5.
>
> It's due to that patch was not merged, please check details in that thread.
>
> Thanks,
CP_UMOUNT_FLAG decide if it need to recovery. Without your patch, it
only print the waring message and both goto reset_checkpoint. I think I
have got the root reason.
Thanks,
Sun Ke
>
>>
>> [root@localhost xfstests-dev]# ./check tests/generic/050
>> FSTYP -- f2fs
>> PLATFORM -- Linux/x86_64 localhost 5.13.0-rc5 #2 SMP Wed Jun 16
>> 20:36:54 CST 2021
>> MKFS_OPTIONS -- /dev/sdb
>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>
>> generic/050 3s ... - output mismatch (see
>> /root/work/xfstests-dev/results//generic/050.out.bad)
>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>> +++ /root/work/xfstests-dev/results//generic/050.out.bad
>> 2021-06-17 11:40:26.107000000 +0800
>> @@ -13,9 +13,7 @@
>> setting device read-only
>> mounting filesystem that needs recovery on a read-only device:
>> mount: device write-protected, mounting read-only
>> -mount: cannot mount device read-only
>> unmounting read-only filesystem
>> -umount: SCRATCH_DEV: not mounted
>> mounting filesystem with -o norecovery on a read-only device:
>> ...
>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out
>> /root/work/xfstests-dev/results//generic/050.out.bad' to see the
>> entire diff)
>> Ran: generic/050
>> Failures: generic/050
>> Failed 1 of 1 tests
>>
>> Thanks,
>> Sun Ke
>>>
>>>>>
>>>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>>>> ---
>>>>>
>>>>> I am not very sure if f2fs do not support metadata journaling.
>>>>>
>>>>> ###
>>>>> before change
>>>>> ###
>>>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>>>> FSTYP -- f2fs
>>>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8
>>>>> SMP Tue Jun 8 11:09:37 CST 2021
>>>>> MKFS_OPTIONS -- /dev/sdb
>>>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>>>
>>>>> generic/050 4s ... - output mismatch (see
>>>>> /root/work/xfstests-dev/results//generic/050.out.bad)
>>>>> --- tests/generic/050.out 2021-05-31 15:37:40.000000000 +0800
>>>>> +++ /root/work/xfstests-dev/results//generic/050.out.bad
>>>>> 2021-06-11 16:48:19.993000000 +0800
>>>>> @@ -13,9 +13,7 @@
>>>>> setting device read-only
>>>>> mounting filesystem that needs recovery on a read-only device:
>>>>> mount: device write-protected, mounting read-only
>>>>> -mount: cannot mount device read-only
>>>>> unmounting read-only filesystem
>>>>> -umount: SCRATCH_DEV: not mounted
>>>>> mounting filesystem with -o norecovery on a read-only device:
>>>>> ...
>>>>> (Run 'diff -u /root/work/xfstests-dev/tests/generic/050.out
>>>>> /root/work/xfstests-dev/results//generic/050.out.bad' to see the
>>>>> entire diff)
>>>>> Ran: generic/050
>>>>> Failures: generic/050
>>>>> Failed 1 of 1 tests
>>>>>
>>>>> ###
>>>>> after change
>>>>> ###
>>>>> [root@localhost xfstests-dev]# ./check tests/generic/050
>>>>> FSTYP -- f2fs
>>>>> PLATFORM -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #8
>>>>> SMP Tue Jun 8 11:09:37 CST 2021
>>>>> MKFS_OPTIONS -- /dev/sdb
>>>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /tmp/scratch
>>>>>
>>>>> generic/050 4s ... 4s
>>>>> Ran: generic/050
>>>>> Passed all 1 tests
>>>>>
>>>>>
>>>>>
>>>>> common/rc | 2 +-
>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/common/rc b/common/rc
>>>>> index a0aa7300..428b8b80 100644
>>>>> --- a/common/rc
>>>>> +++ b/common/rc
>>>>> @@ -3543,7 +3543,7 @@ _has_metadata_journaling()
>>>>> fi
>>>>> case "$FSTYP" in
>>>>> - ext2|vfat|msdos|udf|exfat|tmpfs)
>>>>> + ext2|vfat|msdos|udf|exfat|tmpfs|f2fs)
>>>>> echo "$FSTYP does not support metadata journaling"
>>>>> return 1
>>>>> ;;
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Linux-f2fs-devel mailing list
>>>> Linux-f2fs-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>>> .
> .
_______________________________________________
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] 27+ messages in thread
end of thread, other threads:[~2021-06-18 2:04 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 11:22 [PATCH] common/rc: f2fs do not support metadata journaling Sun Ke
2021-06-11 11:22 ` [PATCH] generic/103: leave more space for f2fs Sun Ke
2021-06-13 14:44 ` Eryu Guan
2021-06-15 3:36 ` Sun Ke
2021-06-15 3:28 ` Sun Ke
2021-06-15 3:28 ` [f2fs-dev] " Sun Ke
2021-06-16 13:15 ` Chao Yu
2021-06-16 13:15 ` Chao Yu
2021-06-17 6:22 ` Sun Ke
2021-06-17 6:22 ` Sun Ke
2021-06-11 11:22 ` [PATCH] generic/260: f2fs is also special Sun Ke
2021-06-15 3:29 ` Sun Ke
2021-06-15 3:29 ` [f2fs-dev] " Sun Ke
2021-06-16 13:43 ` Chao Yu
2021-06-16 13:43 ` Chao Yu
2021-06-17 6:38 ` Sun Ke
2021-06-17 6:38 ` Sun Ke
2021-06-15 3:25 ` [PATCH] common/rc: f2fs do not support metadata journaling Sun Ke
2021-06-15 3:25 ` [f2fs-dev] " Sun Ke
2021-06-16 12:36 ` Chao Yu
2021-06-16 12:36 ` Chao Yu
2021-06-17 3:45 ` Sun Ke
2021-06-17 3:45 ` Sun Ke
2021-06-17 23:46 ` Chao Yu
2021-06-17 23:46 ` Chao Yu
2021-06-18 2:03 ` Sun Ke
2021-06-18 2:03 ` Sun Ke
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.