All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Naohiro Aota <Naohiro.Aota@wdc.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] btrfs: zoned: activate new BG only from extent allocation context
Date: Tue, 22 Mar 2022 16:03:33 +0000	[thread overview]
Message-ID: <PH0PR04MB7416D5F191AC2BDBF4533DD39B179@PH0PR04MB7416.namprd04.prod.outlook.com> (raw)
In-Reply-To: cover.1647936783.git.naohiro.aota@wdc.com

On 22/03/2022 10:11, Naohiro Aota wrote:
> In btrfs_make_block_group(), we activate the allocated block group,
> expecting that the block group is soon used for the extent allocation.
> 
> With a lot of IOs, btrfs_async_reclaim_data_space() tries to prepare
> for them by pre-allocating data block groups. That preallocation can
> consume all the active zone counting. It is OK if they are soon
> written and filled. However, that's not the case. As a result, an
> allocation of non-data block groups fails due to the lack of an active
> zone resource.
> 
> This series fixes the issue by activating a new block group only when
> it's called from find_free_extent(). This series introduces
> CHUNK_ALLOC_FORCE_FOR_EXTENT in btrfs_chunk_alloc_enum to distinguish
> the context.
> 
> --
> Changes
> - v2
>   - Fix a flipped condition
> 
> Naohiro Aota (2):
>   btrfs: return allocated block group from do_chunk_alloc()
>   btrfs: zoned: activate block group only for extent allocation
> 
>  fs/btrfs/block-group.c | 36 +++++++++++++++++++++++++++---------
>  fs/btrfs/block-group.h |  1 +
>  fs/btrfs/extent-tree.c |  2 +-
>  3 files changed, 29 insertions(+), 10 deletions(-)
> 


For the series,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Tested-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

  parent reply	other threads:[~2022-03-22 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22  9:11 [PATCH v2 0/2] btrfs: zoned: activate new BG only from extent allocation context Naohiro Aota
2022-03-22  9:11 ` [PATCH v2 1/2] btrfs: return allocated block group from do_chunk_alloc() Naohiro Aota
2022-03-22  9:11 ` [PATCH v2 2/2] btrfs: zoned: activate block group only for extent allocation Naohiro Aota
2022-04-01 14:12   ` David Sterba
2022-03-22 16:03 ` Johannes Thumshirn [this message]
2022-04-01 14:22 ` [PATCH v2 0/2] btrfs: zoned: activate new BG only from extent allocation context 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=PH0PR04MB7416D5F191AC2BDBF4533DD39B179@PH0PR04MB7416.namprd04.prod.outlook.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --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.