All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Eryu Guan <guan@eryu.me>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
	g.btrfs@cobb.uk.net, quwenruo.btrfs@gmx.com
Subject: Re: [PATCH] btrfs: support other sectorsizes in _scratch_mkfs_blocksized
Date: Mon, 7 Jun 2021 19:54:39 +0800	[thread overview]
Message-ID: <93bfaeff-d47f-4eab-73a7-ca478a3508e2@oracle.com> (raw)
In-Reply-To: <YLzUph/ehN12cMCC@desktop>

On 6/6/21 9:59 pm, Eryu Guan wrote:
> On Fri, Jun 04, 2021 at 08:26:44PM +0800, 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->v1:
>>    Fix path to the supported_sectorsizes path check if the file exists.
>>    Grep the word.
>>
>>   common/rc | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/common/rc b/common/rc
>> index 919028eff41c..baa994e33553 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -1121,6 +1121,15 @@ _scratch_mkfs_blocksized()
>>       fi
>>   
>>       case $FSTYP in
>> +    btrfs)
>> +	test -f /sys/fs/btrfs/features/supported_sectorsizes || \
>> +		_notrun "Subpage sectorsize support is not found in $FSTYP"
> 
> As we're updating _scratch_mkf_blocksized, would you please unify the
> indention for the whole function to use tab instead of spaces? They're
> old code, this way we're slowly migrating old/space indention to tab.

Sure. I am sending a patch separately as the diff will too confusing to 
know what fixed.

> 
>> +
>> +	grep -q \\b$blocksize\\b /sys/fs/btrfs/features/supported_sectorsizes || \
> 
> I think grep -qw should be fine.

  Ok. I will fix this.

> 
>> +		_notrun "$FSTYP does not support sectorsize=$blocksize yet"
>> +
>> +	_scratch_mkfs $MKFS_OPTIONS --sectorsize=$blocksize
> 
> No need to specify $MKFS_OPTIONS here, _scratch_mkfs will append
> $MKFS_OPTIONS anyway.

  Thanks will update.

> 
>> +	;;
>>       xfs)
>>   	_scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize
> 
> So this $MKFS_OPTIONS isn't needed either, but that belongs to another
> patch.

  There are other FSs as well.

Thanks, Anand

> 
> Thanks,
> Eryu
> 
>>   	;;
>> -- 
>> 2.18.4


  reply	other threads:[~2021-06-07 11:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 12:26 [PATCH] btrfs: support other sectorsizes in _scratch_mkfs_blocksized Anand Jain
2021-06-06 13:59 ` Eryu Guan
2021-06-07 11:54   ` Anand Jain [this message]
2021-06-07 12:08 ` [PATCH 0/2 v2] fstests: fix _scratch_mkfs_blocksized Anand Jain
2021-06-07 12:08   ` [PATCH 1/2 v2] btrfs: support other sectorsizes in _scratch_mkfs_blocksized Anand Jain
2021-06-07 12:08   ` [PATCH 2/2 v2] _scratch_mkfs_blocksized: fix indentation Anand Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93bfaeff-d47f-4eab-73a7-ca478a3508e2@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=g.btrfs@cobb.uk.net \
    --cc=guan@eryu.me \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.