All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: "dsterba@suse.cz" <dsterba@suse.cz>
Cc: David Sterba <dsterba@suse.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	Naohiro Aota <Naohiro.Aota@wdc.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] btrfs: zoned: limit ordered extent to zoned append size
Date: Wed, 2 Jun 2021 06:05:45 +0000	[thread overview]
Message-ID: <PH0PR04MB7416169F15A06D565C175A899B3D9@PH0PR04MB7416.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20210601161747.GH31483@suse.cz

On 01/06/2021 18:20, David Sterba wrote:
>> ---
>>  fs/btrfs/ctree.h | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
>> index 5d0398528a7a..6fbafaaebda0 100644
>> --- a/fs/btrfs/ctree.h
>> +++ b/fs/btrfs/ctree.h
>> @@ -1373,7 +1373,10 @@ static inline u32 BTRFS_MAX_XATTR_SIZE(const struct btrfs_fs_info *info)
>>  
>>  static inline u64 btrfs_get_max_extent_size(struct btrfs_fs_info *fs_info)
>>  {
>> -	return BTRFS_MAX_EXTENT_SIZE;
>> +	if (!fs_info || !fs_info->max_zone_append_size)
>> +		return BTRFS_MAX_EXTENT_SIZE;
>> +	return min_t(u64, BTRFS_MAX_EXTENT_SIZE,
>> +		     ALIGN_DOWN(fs_info->max_zone_append_size, PAGE_SIZE));
> 
> Should this be set only once in btrfs_check_zoned_mode ?

Do you mean adding a fs_info->max_extent_size member or 
fs_info->max_zone_append_size = min(BTRFS_MAX_EXTENT_SIZE, queue_max_append_size())?

I'd opt for #1 

  reply	other threads:[~2021-06-02  6:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 13:02 [PATCH 0/2] btrfs: zoned: limit max extent size to max zone append Johannes Thumshirn
2021-06-01 13:02 ` [PATCH 1/2] btrfs: add a helper for retrieving BTRFS_MAX_EXTENT_SIZE Johannes Thumshirn
2021-06-01 13:02 ` [PATCH 2/2] btrfs: zoned: limit ordered extent to zoned append size Johannes Thumshirn
2021-06-01 16:17   ` David Sterba
2021-06-02  6:05     ` Johannes Thumshirn [this message]
2021-06-02 11:13       ` David Sterba

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=PH0PR04MB7416169F15A06D565C175A899B3D9@PH0PR04MB7416.namprd04.prod.outlook.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /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.