diff mbox series

[v2] btrfs/122: fix nodesize option in mfks.btrfs

Message ID a45349aa46e0b185acf59f3914e78dce245bb696.1685705269.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series [v2] btrfs/122: fix nodesize option in mfks.btrfs | expand

Commit Message

Anand Jain June 2, 2023, 11:38 a.m. UTC
btrf/122 is failing on a system with 64k page size:

     QA output created by 122
    +ERROR: illegal nodesize 16384 (smaller than 65536)
    +mount: /mnt/scratch: wrong fs type, bad option, bad superblock on /dev/vdb2, missing codepage or helper program, or other error.
    +mount /dev/vdb2 /mnt/scratch failed
    +(see /xfstests-dev/results//btrfs/122.full for details)

Mkfs.btrfs sets the default node size to 16K when the sector size is less
than 16K, and it matches the sector size when it's greater than 16K.
So, there's no need to explicitly set it.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: Remove the redundant explicit nodesize option from mkfs.btrfs.
    Changed: Title from "btrfs/122: adjust nodesize to match pagesize"
    

 tests/btrfs/122 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Zorro Lang June 10, 2023, 6:57 a.m. UTC | #1
On Fri, Jun 02, 2023 at 07:38:54PM +0800, Anand Jain wrote:
> btrf/122 is failing on a system with 64k page size:
> 
>      QA output created by 122
>     +ERROR: illegal nodesize 16384 (smaller than 65536)
>     +mount: /mnt/scratch: wrong fs type, bad option, bad superblock on /dev/vdb2, missing codepage or helper program, or other error.
>     +mount /dev/vdb2 /mnt/scratch failed
>     +(see /xfstests-dev/results//btrfs/122.full for details)
> 
> Mkfs.btrfs sets the default node size to 16K when the sector size is less
> than 16K, and it matches the sector size when it's greater than 16K.
> So, there's no need to explicitly set it.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> v2: Remove the redundant explicit nodesize option from mkfs.btrfs.
>     Changed: Title from "btrfs/122: adjust nodesize to match pagesize"

Reviewed-by: Zorro Lang <zlang@redhat.com>

>     
> 
>  tests/btrfs/122 | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/tests/btrfs/122 b/tests/btrfs/122
> index 345317536f40..9d5e9efccec7 100755
> --- a/tests/btrfs/122
> +++ b/tests/btrfs/122
> @@ -18,9 +18,7 @@ _supported_fs btrfs
>  _require_scratch
>  _require_btrfs_qgroup_report
>  
> -# Force a small leaf size to make it easier to blow out our root
> -# subvolume tree
> -_scratch_mkfs "--nodesize 16384" >/dev/null
> +_scratch_mkfs >> $seqres.full || _fail "mkfs failed"
>  _scratch_mount
>  _run_btrfs_util_prog quota enable $SCRATCH_MNT
>  
> -- 
> 2.38.1
>
Zorro Lang June 10, 2023, 7:03 a.m. UTC | #2
On Fri, Jun 02, 2023 at 07:38:54PM +0800, Anand Jain wrote:
> btrf/122 is failing on a system with 64k page size:
> 
>      QA output created by 122
>     +ERROR: illegal nodesize 16384 (smaller than 65536)
>     +mount: /mnt/scratch: wrong fs type, bad option, bad superblock on /dev/vdb2, missing codepage or helper program, or other error.
>     +mount /dev/vdb2 /mnt/scratch failed
>     +(see /xfstests-dev/results//btrfs/122.full for details)
> 
> Mkfs.btrfs sets the default node size to 16K when the sector size is less
> than 16K, and it matches the sector size when it's greater than 16K.
> So, there's no need to explicitly set it.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> v2: Remove the redundant explicit nodesize option from mkfs.btrfs.
>     Changed: Title from "btrfs/122: adjust nodesize to match pagesize"
>     
> 
>  tests/btrfs/122 | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/tests/btrfs/122 b/tests/btrfs/122
> index 345317536f40..9d5e9efccec7 100755
> --- a/tests/btrfs/122
> +++ b/tests/btrfs/122
> @@ -18,9 +18,7 @@ _supported_fs btrfs
>  _require_scratch
>  _require_btrfs_qgroup_report
>  
> -# Force a small leaf size to make it easier to blow out our root
> -# subvolume tree
> -_scratch_mkfs "--nodesize 16384" >/dev/null
> +_scratch_mkfs >> $seqres.full || _fail "mkfs failed"

Oh, generally we don't check the return status of default _scratch_mkfs, except
there're specific arguments for _scratch_mkfs. Or we need to add "_fail" to each
mkfs lines. So I'd like to remove that "_fail" when I merge it.

Thanks,
Zorro

>  _scratch_mount
>  _run_btrfs_util_prog quota enable $SCRATCH_MNT
>  
> -- 
> 2.38.1
>
Anand Jain June 10, 2023, 7:56 a.m. UTC | #3
On 10/06/2023 15:03, Zorro Lang wrote:
> On Fri, Jun 02, 2023 at 07:38:54PM +0800, Anand Jain wrote:
>> btrf/122 is failing on a system with 64k page size:
>>
>>       QA output created by 122
>>      +ERROR: illegal nodesize 16384 (smaller than 65536)
>>      +mount: /mnt/scratch: wrong fs type, bad option, bad superblock on /dev/vdb2, missing codepage or helper program, or other error.
>>      +mount /dev/vdb2 /mnt/scratch failed
>>      +(see /xfstests-dev/results//btrfs/122.full for details)
>>
>> Mkfs.btrfs sets the default node size to 16K when the sector size is less
>> than 16K, and it matches the sector size when it's greater than 16K.
>> So, there's no need to explicitly set it.
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>> ---
>> v2: Remove the redundant explicit nodesize option from mkfs.btrfs.
>>      Changed: Title from "btrfs/122: adjust nodesize to match pagesize"
>>      
>>
>>   tests/btrfs/122 | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/tests/btrfs/122 b/tests/btrfs/122
>> index 345317536f40..9d5e9efccec7 100755
>> --- a/tests/btrfs/122
>> +++ b/tests/btrfs/122
>> @@ -18,9 +18,7 @@ _supported_fs btrfs
>>   _require_scratch
>>   _require_btrfs_qgroup_report
>>   
>> -# Force a small leaf size to make it easier to blow out our root
>> -# subvolume tree
>> -_scratch_mkfs "--nodesize 16384" >/dev/null
>> +_scratch_mkfs >> $seqres.full || _fail "mkfs failed"
> 
> Oh, generally we don't check the return status of default _scratch_mkfs, except
> there're specific arguments for _scratch_mkfs. Or we need to add "_fail" to each
> mkfs lines. So I'd like to remove that "_fail" when I merge it.

  Ah. Ok that should be fine.

Thanks, Anand

> 
> Thanks,
> Zorro
> 
>>   _scratch_mount
>>   _run_btrfs_util_prog quota enable $SCRATCH_MNT
>>   
>> -- 
>> 2.38.1
>>
>
Ritesh Harjani (IBM) June 11, 2023, 11:18 a.m. UTC | #4
Anand Jain <anand.jain@oracle.com> writes:

> btrf/122 is failing on a system with 64k page size:
>
>      QA output created by 122
>     +ERROR: illegal nodesize 16384 (smaller than 65536)
>     +mount: /mnt/scratch: wrong fs type, bad option, bad superblock on /dev/vdb2, missing codepage or helper program, or other error.
>     +mount /dev/vdb2 /mnt/scratch failed
>     +(see /xfstests-dev/results//btrfs/122.full for details)
>
> Mkfs.btrfs sets the default node size to 16K when the sector size is less
> than 16K, and it matches the sector size when it's greater than 16K.
> So, there's no need to explicitly set it.
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> v2: Remove the redundant explicit nodesize option from mkfs.btrfs.
>     Changed: Title from "btrfs/122: adjust nodesize to match pagesize"
>
>
>  tests/btrfs/122 | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Thanks for fixing this. I have tested this on Power with 64k pagesize and x86
with 4k pagesize.

Please feel free to add -
Tested-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>

-ritesh
diff mbox series

Patch

diff --git a/tests/btrfs/122 b/tests/btrfs/122
index 345317536f40..9d5e9efccec7 100755
--- a/tests/btrfs/122
+++ b/tests/btrfs/122
@@ -18,9 +18,7 @@  _supported_fs btrfs
 _require_scratch
 _require_btrfs_qgroup_report
 
-# Force a small leaf size to make it easier to blow out our root
-# subvolume tree
-_scratch_mkfs "--nodesize 16384" >/dev/null
+_scratch_mkfs >> $seqres.full || _fail "mkfs failed"
 _scratch_mount
 _run_btrfs_util_prog quota enable $SCRATCH_MNT