From: David Sterba <dsterba@suse.cz>
To: Gabriel Niebler <gniebler@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Turn fs_roots_radix in btrfs_fs_info into an XArray
Date: Wed, 27 Apr 2022 21:21:12 +0200 [thread overview]
Message-ID: <20220427192111.GZ18596@twin.jikos.cz> (raw)
In-Reply-To: <b110e69e-d371-a29e-fd89-f810a4391e7b@suse.com>
On Wed, Apr 27, 2022 at 04:51:07PM +0200, Gabriel Niebler wrote:
> > while (!list_empty(&fs_info->dead_roots)) {
> > [...]
> > - if (test_bit(BTRFS_ROOT_IN_RADIX, &gang[0]->state))
> > - btrfs_drop_and_free_fs_root(fs_info, gang[0]);
> > - btrfs_put_root(gang[0]);
> > + if (test_bit(BTRFS_ROOT_IN_RADIX, &root->state))
> > + btrfs_drop_and_free_fs_root(fs_info, root);
> > + btrfs_put_root(root);
>
> It occurs to me that BTRFS_ROOT_IN_RADIX should probably be renamed to
> something else within or following this patch...
>
> ... but what to rename it /to/?
Good point about the naming but I don't have a concrete idea. The naming
could reflect the status of the entry rather than where is it tracked.
> Naming things is hard. Here are some ideas I've had:
>
> BTRFS_ROOT_IN_XARRAY is obvious, but it also includes kind of a needless
> implementation detail.
This could be a fallback that at least follows the same pattern but yeah
it's not the best one.
next prev parent reply other threads:[~2022-04-27 19:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 21:45 [PATCH] btrfs: Turn fs_roots_radix in btrfs_fs_info into an XArray Gabriel Niebler
2022-04-27 14:51 ` Gabriel Niebler
2022-04-27 19:21 ` David Sterba [this message]
2022-04-28 11:37 ` Nikolay Borisov
2022-04-27 20:07 ` David Sterba
2022-04-28 11:59 ` Nikolay Borisov
2022-05-02 8:59 ` Gabriel Niebler
2022-05-02 18:39 ` David Sterba
2022-05-03 8:01 ` Gabriel Niebler
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=20220427192111.GZ18596@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=gniebler@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox