Linux-BTRFS Archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: fdmanana@kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: initialize delayed inodes xarray without GFP_ATOMIC
Date: Thu, 18 Apr 2024 10:40:46 +0930	[thread overview]
Message-ID: <8a52e741-fc38-4b7e-9a2e-6c206295944b@gmx.com> (raw)
In-Reply-To: <b1eaf444091755ac133e26f44fb2836bb5280132.1713367002.git.fdmanana@suse.com>



在 2024/4/18 00:48, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
>
> There's no need to initialize the delayed inodes xarray with a GFP_ATOMIC
> flag because that actually does nothing on the xarray operations. That was
> needed for radix trees (before their internals were updated to use xarray)
> but for xarrays the allocation flags are passed as the last argument to
> xa_store() (which we are using correctly).
>
> So initialize the delayed inodes xarray with a simple xa_init().

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> ---
>   fs/btrfs/disk-io.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 6eeac9618a69..5b6838156237 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -663,8 +663,7 @@ static void __setup_root(struct btrfs_root *root, struct btrfs_fs_info *fs_info,
>   	root->nr_delalloc_inodes = 0;
>   	root->nr_ordered_extents = 0;
>   	root->inode_tree = RB_ROOT;
> -	/* GFP flags are compatible with XA_FLAGS_*. */
> -	xa_init_flags(&root->delayed_nodes, GFP_ATOMIC);
> +	xa_init(&root->delayed_nodes);
>
>   	btrfs_init_root_block_rsv(root);
>

      parent reply	other threads:[~2024-04-18  1:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 15:18 [PATCH] btrfs: initialize delayed inodes xarray without GFP_ATOMIC fdmanana
2024-04-17 20:50 ` David Sterba
2024-04-17 21:01 ` Josef Bacik
2024-04-18  1:10 ` Qu Wenruo [this message]

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=8a52e741-fc38-4b7e-9a2e-6c206295944b@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=fdmanana@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).