All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/042: set size to 38M for f2fs
@ 2021-05-18 11:47 Sun Ke
  2021-05-31  2:11 ` Chao Yu
  0 siblings, 1 reply; 4+ messages in thread
From: Sun Ke @ 2021-05-18 11:47 UTC (permalink / raw)
  To: fstests, guan, djwong; +Cc: sunke32

25M is too small for f2fs:

Info: Disable heap-based policy
Info: Debug level = 0
Info: Label =
Info: Trim is enabled
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 51200 (25 MB)
Info: zone aligned segment0 blkaddr: 512
    Error: Device size is not sufficient for F2FS volume
    Error: Failed to prepare a super block!!!
    Error: Could not format the device!!!

So, set size to 38M for f2fs.

Signed-off-by: Sun Ke <sunke32@huawei.com>
---
I have tried from 25M, until 38M, it passed.

[root@localhost xfstests]# ./check tests/generic/042
FSTYP         -- f2fs
PLATFORM      -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #3 SMP Wed Apr 21 22:29:25 EDT 2021
MKFS_OPTIONS  -- /dev/sdb
MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /mnt/scratch

generic/042 2s ...  2s
Ran: generic/042
Passed all 1 tests

 tests/generic/042 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/generic/042 b/tests/generic/042
index 35727bcb..ee0e4b40 100755
--- a/tests/generic/042
+++ b/tests/generic/042
@@ -41,10 +41,16 @@ _crashtest()
 	img=$SCRATCH_MNT/$seq.img
 	mnt=$SCRATCH_MNT/$seq.mnt
 	file=$mnt/file
+	size=25M
+
+	# 25M is too small for f2fs.
+	if [ $FSTYP == "f2fs" ]; then
+		size=38M
+	fi
 
 	# Create an fs on a small, initialized image. The pattern is written to
 	# the image to detect stale data exposure.
-	$XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 25M" $img \
+	$XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 $size" $img \
 		>> $seqres.full 2>&1
 	_mkfs_dev $img >> $seqres.full 2>&1
 
-- 
2.13.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] generic/042: set size to 38M for f2fs
  2021-05-18 11:47 [PATCH] generic/042: set size to 38M for f2fs Sun Ke
@ 2021-05-31  2:11 ` Chao Yu
  2021-05-31  3:54   ` Sun Ke
  0 siblings, 1 reply; 4+ messages in thread
From: Chao Yu @ 2021-05-31  2:11 UTC (permalink / raw)
  To: Sun Ke, guan; +Cc: fstests, djwong

On 2021/5/18 19:47, Sun Ke wrote:
> 25M is too small for f2fs:
> 
> Info: Disable heap-based policy
> Info: Debug level = 0
> Info: Label =
> Info: Trim is enabled
> Info: Segments per section = 1
> Info: Sections per zone = 1
> Info: sector size = 512
> Info: total sectors = 51200 (25 MB)
> Info: zone aligned segment0 blkaddr: 512
>      Error: Device size is not sufficient for F2FS volume
>      Error: Failed to prepare a super block!!!
>      Error: Could not format the device!!!
> 
> So, set size to 38M for f2fs.

It looks f2fs-utils 1.14.0 needs at least 52 MB space for f2fs image.

mkfs.f2fs /dev/zram0 13056 -f

	F2FS-tools: mkfs.f2fs Ver: 1.14.0 (2021-02-16)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Trim is enabled
Info: wanted sectors = 13056 (in 18446744073709551615 bytes)
Info: total device sectors = 4194304 (in 4096 bytes)
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 4096
Info: total sectors = 13056 (51 MB)
Info: zone aligned segment0 blkaddr: 512
	Error: Device size is not sufficient for F2FS volume
	Error: Failed to prepare a super block!!!
	Error: Could not format the device!!!

Thanks,

> 
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
> I have tried from 25M, until 38M, it passed.
> 
> [root@localhost xfstests]# ./check tests/generic/042
> FSTYP         -- f2fs
> PLATFORM      -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #3 SMP Wed Apr 21 22:29:25 EDT 2021
> MKFS_OPTIONS  -- /dev/sdb
> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /mnt/scratch
> 
> generic/042 2s ...  2s
> Ran: generic/042
> Passed all 1 tests
> 
>   tests/generic/042 | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/generic/042 b/tests/generic/042
> index 35727bcb..ee0e4b40 100755
> --- a/tests/generic/042
> +++ b/tests/generic/042
> @@ -41,10 +41,16 @@ _crashtest()
>   	img=$SCRATCH_MNT/$seq.img
>   	mnt=$SCRATCH_MNT/$seq.mnt
>   	file=$mnt/file
> +	size=25M
> +
> +	# 25M is too small for f2fs.
> +	if [ $FSTYP == "f2fs" ]; then
> +		size=38M
> +	fi
>   
>   	# Create an fs on a small, initialized image. The pattern is written to
>   	# the image to detect stale data exposure.
> -	$XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 25M" $img \
> +	$XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 $size" $img \
>   		>> $seqres.full 2>&1
>   	_mkfs_dev $img >> $seqres.full 2>&1
>   
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] generic/042: set size to 38M for f2fs
  2021-05-31  2:11 ` Chao Yu
@ 2021-05-31  3:54   ` Sun Ke
  2021-06-01  2:26     ` Chao Yu
  0 siblings, 1 reply; 4+ messages in thread
From: Sun Ke @ 2021-05-31  3:54 UTC (permalink / raw)
  To: Chao Yu, guan; +Cc: fstests, djwong



在 2021/5/31 10:11, Chao Yu 写道:
> On 2021/5/18 19:47, Sun Ke wrote:
>> 25M is too small for f2fs:
>>
>> Info: Disable heap-based policy
>> Info: Debug level = 0
>> Info: Label =
>> Info: Trim is enabled
>> Info: Segments per section = 1
>> Info: Sections per zone = 1
>> Info: sector size = 512
>> Info: total sectors = 51200 (25 MB)
>> Info: zone aligned segment0 blkaddr: 512
>>      Error: Device size is not sufficient for F2FS volume
>>      Error: Failed to prepare a super block!!!
>>      Error: Could not format the device!!!
>>
>> So, set size to 38M for f2fs.
> 
> It looks f2fs-utils 1.14.0 needs at least 52 MB space for f2fs image.
> 
> mkfs.f2fs /dev/zram0 13056 -f
> 
>      F2FS-tools: mkfs.f2fs Ver: 1.14.0 (2021-02-16)
> 
> Info: Disable heap-based policy
> Info: Debug level = 0
> Info: Trim is enabled
> Info: wanted sectors = 13056 (in 18446744073709551615 bytes)
> Info: total device sectors = 4194304 (in 4096 bytes)
> Info: Segments per section = 1
> Info: Sections per zone = 1
> Info: sector size = 4096
> Info: total sectors = 13056 (51 MB)
> Info: zone aligned segment0 blkaddr: 512
>      Error: Device size is not sufficient for F2FS volume
>      Error: Failed to prepare a super block!!!
>      Error: Could not format the device!!!
> 
> Thanks,

My F2FS-tools is mkfs.f2fs Ver: 1.9.0 (2017-09-21). So, is 52MB  enough? 
The image size f2fs needed seems growing.

Thanks.
Sun Ke

> 
>>
>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>> ---
>> I have tried from 25M, until 38M, it passed.
>>
>> [root@localhost xfstests]# ./check tests/generic/042
>> FSTYP         -- f2fs
>> PLATFORM      -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #3 
>> SMP Wed Apr 21 22:29:25 EDT 2021
>> MKFS_OPTIONS  -- /dev/sdb
>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /mnt/scratch
>>
>> generic/042 2s ...  2s
>> Ran: generic/042
>> Passed all 1 tests
>>
>>   tests/generic/042 | 8 +++++++-
>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/generic/042 b/tests/generic/042
>> index 35727bcb..ee0e4b40 100755
>> --- a/tests/generic/042
>> +++ b/tests/generic/042
>> @@ -41,10 +41,16 @@ _crashtest()
>>       img=$SCRATCH_MNT/$seq.img
>>       mnt=$SCRATCH_MNT/$seq.mnt
>>       file=$mnt/file
>> +    size=25M
>> +
>> +    # 25M is too small for f2fs.
>> +    if [ $FSTYP == "f2fs" ]; then
>> +        size=38M
>> +    fi
>>       # Create an fs on a small, initialized image. The pattern is 
>> written to
>>       # the image to detect stale data exposure.
>> -    $XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 25M" $img \
>> +    $XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 $size" $img \
>>           >> $seqres.full 2>&1
>>       _mkfs_dev $img >> $seqres.full 2>&1
>>
> .

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] generic/042: set size to 38M for f2fs
  2021-05-31  3:54   ` Sun Ke
@ 2021-06-01  2:26     ` Chao Yu
  0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2021-06-01  2:26 UTC (permalink / raw)
  To: Sun Ke, guan; +Cc: fstests, djwong

On 2021/5/31 11:54, Sun Ke wrote:
> 
> 
> 在 2021/5/31 10:11, Chao Yu 写道:
>> On 2021/5/18 19:47, Sun Ke wrote:
>>> 25M is too small for f2fs:
>>>
>>> Info: Disable heap-based policy
>>> Info: Debug level = 0
>>> Info: Label =
>>> Info: Trim is enabled
>>> Info: Segments per section = 1
>>> Info: Sections per zone = 1
>>> Info: sector size = 512
>>> Info: total sectors = 51200 (25 MB)
>>> Info: zone aligned segment0 blkaddr: 512
>>>       Error: Device size is not sufficient for F2FS volume
>>>       Error: Failed to prepare a super block!!!
>>>       Error: Could not format the device!!!
>>>
>>> So, set size to 38M for f2fs.
>>
>> It looks f2fs-utils 1.14.0 needs at least 52 MB space for f2fs image.
>>
>> mkfs.f2fs /dev/zram0 13056 -f
>>
>>       F2FS-tools: mkfs.f2fs Ver: 1.14.0 (2021-02-16)
>>
>> Info: Disable heap-based policy
>> Info: Debug level = 0
>> Info: Trim is enabled
>> Info: wanted sectors = 13056 (in 18446744073709551615 bytes)
>> Info: total device sectors = 4194304 (in 4096 bytes)
>> Info: Segments per section = 1
>> Info: Sections per zone = 1
>> Info: sector size = 4096
>> Info: total sectors = 13056 (51 MB)
>> Info: zone aligned segment0 blkaddr: 512
>>       Error: Device size is not sufficient for F2FS volume
>>       Error: Failed to prepare a super block!!!
>>       Error: Could not format the device!!!
>>
>> Thanks,
> 
> My F2FS-tools is mkfs.f2fs Ver: 1.9.0 (2017-09-21). So, is 52MB  enough?
> The image size f2fs needed seems growing.

Not sure it may change again, but at least we need to configure mininum
size of f2fs image to 52MB in xfstest.

Thanks,

> 
> Thanks.
> Sun Ke
> 
>>
>>>
>>> Signed-off-by: Sun Ke <sunke32@huawei.com>
>>> ---
>>> I have tried from 25M, until 38M, it passed.
>>>
>>> [root@localhost xfstests]# ./check tests/generic/042
>>> FSTYP         -- f2fs
>>> PLATFORM      -- Linux/x86_64 localhost 5.12.0-rc5-next-20210330 #3
>>> SMP Wed Apr 21 22:29:25 EDT 2021
>>> MKFS_OPTIONS  -- /dev/sdb
>>> MOUNT_OPTIONS -- -o acl,user_xattr /dev/sdb /mnt/scratch
>>>
>>> generic/042 2s ...  2s
>>> Ran: generic/042
>>> Passed all 1 tests
>>>
>>>    tests/generic/042 | 8 +++++++-
>>>    1 file changed, 7 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tests/generic/042 b/tests/generic/042
>>> index 35727bcb..ee0e4b40 100755
>>> --- a/tests/generic/042
>>> +++ b/tests/generic/042
>>> @@ -41,10 +41,16 @@ _crashtest()
>>>        img=$SCRATCH_MNT/$seq.img
>>>        mnt=$SCRATCH_MNT/$seq.mnt
>>>        file=$mnt/file
>>> +    size=25M
>>> +
>>> +    # 25M is too small for f2fs.
>>> +    if [ $FSTYP == "f2fs" ]; then
>>> +        size=38M
>>> +    fi
>>>        # Create an fs on a small, initialized image. The pattern is
>>> written to
>>>        # the image to detect stale data exposure.
>>> -    $XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 25M" $img \
>>> +    $XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 $size" $img \
>>>            >> $seqres.full 2>&1
>>>        _mkfs_dev $img >> $seqres.full 2>&1
>>>
>> .
> .
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-01  2:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 11:47 [PATCH] generic/042: set size to 38M for f2fs Sun Ke
2021-05-31  2:11 ` Chao Yu
2021-05-31  3:54   ` Sun Ke
2021-06-01  2:26     ` Chao Yu

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.