All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] btrfs: support other sectorsizes in _scratch_mkfs_blocksized
@ 2021-06-04  9:36 Anand Jain
  2021-06-04  9:53 ` Qu Wenruo
  2021-06-04 10:51 ` PATCH " Graham Cobb
  0 siblings, 2 replies; 5+ messages in thread
From: Anand Jain @ 2021-06-04  9:36 UTC (permalink / raw)
  To: linux-btrfs; +Cc: wqu, dsterba

When btrfs supports sectorsize != pagesize it can run these test cases
now,
generic/205 generic/206 generic/216 generic/217 generic/218 generic/220
generic/222 generic/227 generic/229 generic/238

This change is backward compatible for kernels without non pagesize
sectorsize support.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
RFC: Are we ok with this patch?
     fstests completed on first 19 patches of subpage support (results I
     need to review yet) on arch64, with pagesize=64k.
     Subpage RW support tests are still pending.

 common/rc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/common/rc b/common/rc
index 919028eff41c..b4c1d5f285f7 100644
--- a/common/rc
+++ b/common/rc
@@ -1121,6 +1121,13 @@ _scratch_mkfs_blocksized()
     fi
 
     case $FSTYP in
+    btrfs)
+	grep -q $blocksize /sys/fs/btrfs/supported_sectorsizes
+	if [ $? ]; then
+		_notrun "$FSTYP does not support sectorsize=$blocksize yet"
+	fi
+	_scratch_mkfs $MKFS_OPTIONS --sectorsize=$blocksize
+	;;
     xfs)
 	_scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize
 	;;
-- 
2.18.4


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

* Re: [PATCH RFC] btrfs: support other sectorsizes in _scratch_mkfs_blocksized
  2021-06-04  9:36 [PATCH RFC] btrfs: support other sectorsizes in _scratch_mkfs_blocksized Anand Jain
@ 2021-06-04  9:53 ` Qu Wenruo
  2021-06-04 12:05   ` Anand Jain
  2021-06-04 10:51 ` PATCH " Graham Cobb
  1 sibling, 1 reply; 5+ messages in thread
From: Qu Wenruo @ 2021-06-04  9:53 UTC (permalink / raw)
  To: Anand Jain, linux-btrfs; +Cc: wqu, dsterba



On 2021/6/4 下午5:36, Anand Jain wrote:
> When btrfs supports sectorsize != pagesize it can run these test cases
> now,
> generic/205 generic/206 generic/216 generic/217 generic/218 generic/220
> generic/222 generic/227 generic/229 generic/238
>
> This change is backward compatible for kernels without non pagesize
> sectorsize support.
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> RFC: Are we ok with this patch?

Awesome! I forgot those tests.

But unfortunately, those tests are still skipped due to the fixed
supported sectorsize.

Those tests uses PAGE_SIZE / 4, but we only support PAGE_SIZE / 16 yet
for 64K page size.

But I still believe this fix is appreciated for the future subpage
support. (Yep, we will support other sector size, along with different
PAGE_SIZE in not so far future).


>       fstests completed on first 19 patches of subpage support (results I
>       need to review yet) on arch64, with pagesize=64k.
>       Subpage RW support tests are still pending.
>
>   common/rc | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/common/rc b/common/rc
> index 919028eff41c..b4c1d5f285f7 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1121,6 +1121,13 @@ _scratch_mkfs_blocksized()
>       fi
>
>       case $FSTYP in
> +    btrfs)
> +	grep -q $blocksize /sys/fs/btrfs/supported_sectorsizes
> +	if [ $? ]; then
> +		_notrun "$FSTYP does not support sectorsize=$blocksize yet"
> +	fi

Can't we merge the the if with grep by:
	if grep -q $blocksize /sys/fs/btrfs/supported_sectorsizes; then

Thanks,
Qu
> +	_scratch_mkfs $MKFS_OPTIONS --sectorsize=$blocksize
> +	;;
>       xfs)
>   	_scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize
>   	;;
>

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

* Re: PATCH RFC] btrfs: support other sectorsizes in _scratch_mkfs_blocksized
  2021-06-04  9:36 [PATCH RFC] btrfs: support other sectorsizes in _scratch_mkfs_blocksized Anand Jain
  2021-06-04  9:53 ` Qu Wenruo
@ 2021-06-04 10:51 ` Graham Cobb
  2021-06-04 12:02   ` Anand Jain
  1 sibling, 1 reply; 5+ messages in thread
From: Graham Cobb @ 2021-06-04 10:51 UTC (permalink / raw)
  To: Anand Jain, linux-btrfs

On 04/06/2021 10:36, Anand Jain wrote:
>  
>      case $FSTYP in
> +    btrfs)
> +	grep -q $blocksize /sys/fs/btrfs/supported_sectorsizes

Should this be "grep -qw"? Admittedly there is unlikely to be a false
match but the sectorsize should be matched as a whole word.

If there are any greps which do not provide -w then the search string
could be "\\b$blocksize\\b".

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

* Re: PATCH RFC] btrfs: support other sectorsizes in _scratch_mkfs_blocksized
  2021-06-04 10:51 ` PATCH " Graham Cobb
@ 2021-06-04 12:02   ` Anand Jain
  0 siblings, 0 replies; 5+ messages in thread
From: Anand Jain @ 2021-06-04 12:02 UTC (permalink / raw)
  To: Graham Cobb, linux-btrfs



On 4/6/21 6:51 pm, Graham Cobb wrote:
> On 04/06/2021 10:36, Anand Jain wrote:
>>   
>>       case $FSTYP in
>> +    btrfs)
>> +	grep -q $blocksize /sys/fs/btrfs/supported_sectorsizes
> 
> Should this be "grep -qw"? Admittedly there is unlikely to be a false
> match but the sectorsize should be matched as a whole word.
> 
> If there are any greps which do not provide -w then the search string
> could be "\\b$blocksize\\b".
> 

Agreed. Match the with whole word is better. Will add.

Thanks, Anand

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

* Re: [PATCH RFC] btrfs: support other sectorsizes in _scratch_mkfs_blocksized
  2021-06-04  9:53 ` Qu Wenruo
@ 2021-06-04 12:05   ` Anand Jain
  0 siblings, 0 replies; 5+ messages in thread
From: Anand Jain @ 2021-06-04 12:05 UTC (permalink / raw)
  To: Qu Wenruo, linux-btrfs; +Cc: wqu, dsterba



On 4/6/21 5:53 pm, Qu Wenruo wrote:
> 
> 
> On 2021/6/4 下午5:36, Anand Jain wrote:
>> When btrfs supports sectorsize != pagesize it can run these test cases
>> now,
>> generic/205 generic/206 generic/216 generic/217 generic/218 generic/220
>> generic/222 generic/227 generic/229 generic/238
>>
>> This change is backward compatible for kernels without non pagesize
>> sectorsize support.
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>> ---
>> RFC: Are we ok with this patch?
> 
> Awesome! I forgot those tests.
> 
> But unfortunately, those tests are still skipped due to the fixed
> supported sectorsize.
> 
> Those tests uses PAGE_SIZE / 4, but we only support PAGE_SIZE / 16 yet
> for 64K page size.
> 
> But I still believe this fix is appreciated for the future subpage
> support. (Yep, we will support other sector size, along with different
> PAGE_SIZE in not so far future).
> 
> 
>>       fstests completed on first 19 patches of subpage support (results I
>>       need to review yet) on arch64, with pagesize=64k.
>>       Subpage RW support tests are still pending.
>>
>>   common/rc | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/common/rc b/common/rc
>> index 919028eff41c..b4c1d5f285f7 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -1121,6 +1121,13 @@ _scratch_mkfs_blocksized()
>>       fi
>>
>>       case $FSTYP in
>> +    btrfs)
>> +    grep -q $blocksize /sys/fs/btrfs/supported_sectorsizes
>> +    if [ $? ]; then
>> +        _notrun "$FSTYP does not support sectorsize=$blocksize yet"
>> +    fi
> 
> Can't we merge the the if with grep by:
>      if grep -q $blocksize /sys/fs/btrfs/supported_sectorsizes; then

  Will improve this and resend.

Thanks, Anand

> 
> Thanks,
> Qu
>> +    _scratch_mkfs $MKFS_OPTIONS --sectorsize=$blocksize
>> +    ;;
>>       xfs)
>>       _scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize
>>       ;;
>>

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

end of thread, other threads:[~2021-06-04 12:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04  9:36 [PATCH RFC] btrfs: support other sectorsizes in _scratch_mkfs_blocksized Anand Jain
2021-06-04  9:53 ` Qu Wenruo
2021-06-04 12:05   ` Anand Jain
2021-06-04 10:51 ` PATCH " Graham Cobb
2021-06-04 12:02   ` Anand Jain

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.