All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs/057: Fix test case to work on 64K page size
@ 2017-12-06  6:45 Harish
  2017-12-06  7:35 ` Eryu Guan
  0 siblings, 1 reply; 4+ messages in thread
From: Harish @ 2017-12-06  6:45 UTC (permalink / raw)
  To: fstests; +Cc: Harish

On platforms with a page size greater than 4Kb, at the moment btrfs
doesn't support a node/leaf size smaller than the page size, but it
supports a larger one. So use the max supported node size (64Kb) so
that the test runs on any platform currently supported by Linux.

Signed-off-by: Harish <harish@linux.vnet.ibm.com>
---
 tests/btrfs/057     | 7 +++++--
 tests/btrfs/057.out | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/btrfs/057 b/tests/btrfs/057
index 8d35579..06b2be9 100755
--- a/tests/btrfs/057
+++ b/tests/btrfs/057
@@ -48,8 +48,11 @@ _require_scratch
 
 rm -f $seqres.full
 
-# use small leaf size to get higher btree height.
-run_check _scratch_mkfs "-b 1g --nodesize 4096"
+# Currently in btrfs the node/leaf size can not be smaller than the page
+# size (but it can be greater than the page size). So use the largest
+# supported node/leaf size (64Kb) so that the test can run on any platform
+# that Linux supports.
+run_check _scratch_mkfs "-b 1g --nodesize 65536"
 
 # inode cache is saved in the FS tree itself for every
 # individual FS tree,that affects the sizes reported by qgroup show
diff --git a/tests/btrfs/057.out b/tests/btrfs/057.out
index 60cb92d..f2d9e9c 100644
--- a/tests/btrfs/057.out
+++ b/tests/btrfs/057.out
@@ -1,3 +1,3 @@
 QA output created by 057
-4096 4096
-4096 4096
+65536 65536
+65536 65536
-- 
2.7.4


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

* Re: [PATCH] btrfs/057: Fix test case to work on 64K page size
  2017-12-06  6:45 [PATCH] btrfs/057: Fix test case to work on 64K page size Harish
@ 2017-12-06  7:35 ` Eryu Guan
  2017-12-06  7:46   ` Qu Wenruo
  0 siblings, 1 reply; 4+ messages in thread
From: Eryu Guan @ 2017-12-06  7:35 UTC (permalink / raw)
  To: Harish; +Cc: fstests, linux-btrfs

On Wed, Dec 06, 2017 at 12:15:45PM +0530, Harish wrote:
> On platforms with a page size greater than 4Kb, at the moment btrfs
> doesn't support a node/leaf size smaller than the page size, but it
> supports a larger one. So use the max supported node size (64Kb) so
> that the test runs on any platform currently supported by Linux.
> 
> Signed-off-by: Harish <harish@linux.vnet.ibm.com>

Looks fine to me. Also cc btrfs list for review.

Thanks,
Eryu

> ---
>  tests/btrfs/057     | 7 +++++--
>  tests/btrfs/057.out | 4 ++--
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/btrfs/057 b/tests/btrfs/057
> index 8d35579..06b2be9 100755
> --- a/tests/btrfs/057
> +++ b/tests/btrfs/057
> @@ -48,8 +48,11 @@ _require_scratch
>  
>  rm -f $seqres.full
>  
> -# use small leaf size to get higher btree height.
> -run_check _scratch_mkfs "-b 1g --nodesize 4096"
> +# Currently in btrfs the node/leaf size can not be smaller than the page
> +# size (but it can be greater than the page size). So use the largest
> +# supported node/leaf size (64Kb) so that the test can run on any platform
> +# that Linux supports.
> +run_check _scratch_mkfs "-b 1g --nodesize 65536"
>  
>  # inode cache is saved in the FS tree itself for every
>  # individual FS tree,that affects the sizes reported by qgroup show
> diff --git a/tests/btrfs/057.out b/tests/btrfs/057.out
> index 60cb92d..f2d9e9c 100644
> --- a/tests/btrfs/057.out
> +++ b/tests/btrfs/057.out
> @@ -1,3 +1,3 @@
>  QA output created by 057
> -4096 4096
> -4096 4096
> +65536 65536
> +65536 65536
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] btrfs/057: Fix test case to work on 64K page size
  2017-12-06  7:35 ` Eryu Guan
@ 2017-12-06  7:46   ` Qu Wenruo
  2017-12-07 10:03     ` Harish
  0 siblings, 1 reply; 4+ messages in thread
From: Qu Wenruo @ 2017-12-06  7:46 UTC (permalink / raw)
  To: Eryu Guan, Harish; +Cc: fstests, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 3015 bytes --]



On 2017年12月06日 15:35, Eryu Guan wrote:
> On Wed, Dec 06, 2017 at 12:15:45PM +0530, Harish wrote:
>> On platforms with a page size greater than 4Kb, at the moment btrfs
>> doesn't support a node/leaf size smaller than the page size, but it
>> supports a larger one. So use the max supported node size (64Kb) so
>> that the test runs on any platform currently supported by Linux.
>>
>> Signed-off-by: Harish <harish@linux.vnet.ibm.com>
> 
> Looks fine to me. Also cc btrfs list for review.
> 
> Thanks,
> Eryu
> 
>> ---
>>  tests/btrfs/057     | 7 +++++--
>>  tests/btrfs/057.out | 4 ++--
>>  2 files changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/tests/btrfs/057 b/tests/btrfs/057
>> index 8d35579..06b2be9 100755
>> --- a/tests/btrfs/057
>> +++ b/tests/btrfs/057
>> @@ -48,8 +48,11 @@ _require_scratch
>>  
>>  rm -f $seqres.full
>>  
>> -# use small leaf size to get higher btree height.
>> -run_check _scratch_mkfs "-b 1g --nodesize 4096"
>> +# Currently in btrfs the node/leaf size can not be smaller than the page
>> +# size (but it can be greater than the page size). So use the largest
>> +# supported node/leaf size (64Kb) so that the test can run on any platform
>> +# that Linux supports.
>> +run_check _scratch_mkfs "-b 1g --nodesize 65536"

Personally speaking, the test doesn't really need super high tree height.
So I think it's OK to use a different node size.

But I prefer default mkfs.btrfs, which will choose valid nodesize.
So for 4K system, it will use default 16K other than always using the
64K nodesize.


And further more, the test case is quite old, from the old days when we
did even have btrfs check support for qgroup.

With new btrfs check support, we don't really need to do anything to
check qgroup numbers in test cases, just let fstests post test routines
to handle it.

If qgroup is corrupted, fstests will report something inconsistent
filesystem at post test fsck.
Just like what we do in btrfs/126. (so no need to use any magic number
in 057.out)

So would you please also update the test case to get benefit from the
newer btrfs-progs?

Thanks,
Qu

>>  
>>  # inode cache is saved in the FS tree itself for every
>>  # individual FS tree,that affects the sizes reported by qgroup show
>> diff --git a/tests/btrfs/057.out b/tests/btrfs/057.out
>> index 60cb92d..f2d9e9c 100644
>> --- a/tests/btrfs/057.out
>> +++ b/tests/btrfs/057.out
>> @@ -1,3 +1,3 @@
>>  QA output created by 057
>> -4096 4096
>> -4096 4096
>> +65536 65536
>> +65536 65536
>> -- 
>> 2.7.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe fstests" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]

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

* Re: [PATCH] btrfs/057: Fix test case to work on 64K page size
  2017-12-06  7:46   ` Qu Wenruo
@ 2017-12-07 10:03     ` Harish
  0 siblings, 0 replies; 4+ messages in thread
From: Harish @ 2017-12-07 10:03 UTC (permalink / raw)
  To: Qu Wenruo, Eryu Guan; +Cc: fstests, linux-btrfs

Sure will work on this. Thanks.

Harish

On 12/06/2017 01:16 PM, Qu Wenruo wrote:
>
>
> On 2017年12月06日 15:35, Eryu Guan wrote:
>> On Wed, Dec 06, 2017 at 12:15:45PM +0530, Harish wrote:
>>> On platforms with a page size greater than 4Kb, at the moment btrfs
>>> doesn't support a node/leaf size smaller than the page size, but it
>>> supports a larger one. So use the max supported node size (64Kb) so
>>> that the test runs on any platform currently supported by Linux.
>>>
>>> Signed-off-by: Harish <harish@linux.vnet.ibm.com>
>>
>> Looks fine to me. Also cc btrfs list for review.
>>
>> Thanks,
>> Eryu
>>
>>> ---
>>>  tests/btrfs/057     | 7 +++++--
>>>  tests/btrfs/057.out | 4 ++--
>>>  2 files changed, 7 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/tests/btrfs/057 b/tests/btrfs/057
>>> index 8d35579..06b2be9 100755
>>> --- a/tests/btrfs/057
>>> +++ b/tests/btrfs/057
>>> @@ -48,8 +48,11 @@ _require_scratch
>>>
>>>  rm -f $seqres.full
>>>
>>> -# use small leaf size to get higher btree height.
>>> -run_check _scratch_mkfs "-b 1g --nodesize 4096"
>>> +# Currently in btrfs the node/leaf size can not be smaller than the page
>>> +# size (but it can be greater than the page size). So use the largest
>>> +# supported node/leaf size (64Kb) so that the test can run on any platform
>>> +# that Linux supports.
>>> +run_check _scratch_mkfs "-b 1g --nodesize 65536"
>
> Personally speaking, the test doesn't really need super high tree height.
> So I think it's OK to use a different node size.
>
> But I prefer default mkfs.btrfs, which will choose valid nodesize.
> So for 4K system, it will use default 16K other than always using the
> 64K nodesize.
>
>
> And further more, the test case is quite old, from the old days when we
> did even have btrfs check support for qgroup.
>
> With new btrfs check support, we don't really need to do anything to
> check qgroup numbers in test cases, just let fstests post test routines
> to handle it.
>
> If qgroup is corrupted, fstests will report something inconsistent
> filesystem at post test fsck.
> Just like what we do in btrfs/126. (so no need to use any magic number
> in 057.out)
>
> So would you please also update the test case to get benefit from the
> newer btrfs-progs?
>
> Thanks,
> Qu
>
>>>
>>>  # inode cache is saved in the FS tree itself for every
>>>  # individual FS tree,that affects the sizes reported by qgroup show
>>> diff --git a/tests/btrfs/057.out b/tests/btrfs/057.out
>>> index 60cb92d..f2d9e9c 100644
>>> --- a/tests/btrfs/057.out
>>> +++ b/tests/btrfs/057.out
>>> @@ -1,3 +1,3 @@
>>>  QA output created by 057
>>> -4096 4096
>>> -4096 4096
>>> +65536 65536
>>> +65536 65536
>>> --
>>> 2.7.4
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe fstests" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> --
>> To unsubscribe from this list: send the line "unsubscribe fstests" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>


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

end of thread, other threads:[~2017-12-07 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06  6:45 [PATCH] btrfs/057: Fix test case to work on 64K page size Harish
2017-12-06  7:35 ` Eryu Guan
2017-12-06  7:46   ` Qu Wenruo
2017-12-07 10:03     ` Harish

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.