From: Christoph Hellwig <hch@lst.de>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: linux-xfs@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Damien Le Moal <dlemoal@kernel.org>,
Carlos Maiolino <cem@kernel.org>
Subject: Re: [PATCH 3/3] xfs: create rtgroup metadir inodes using xfs_metadir_create_file
Date: Mon, 13 Jul 2026 08:58:01 +0200 [thread overview]
Message-ID: <20260713065801.GJ29416@lst.de> (raw)
In-Reply-To: <20260712093317.782831-4-johannes.thumshirn@wdc.com>
On Sun, Jul 12, 2026 at 11:33:17AM +0200, Johannes Thumshirn wrote:
> Now that we have xfs_metadir_create_file() use it in
> xfs_rtginode_create().
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
> fs/xfs/libxfs/xfs_rtgroup.c | 58 +++++++++++++++++--------------------
> 1 file changed, 26 insertions(+), 32 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_rtgroup.c b/fs/xfs/libxfs/xfs_rtgroup.c
> index caecc1e1f723..b6844b9af390 100644
> --- a/fs/xfs/libxfs/xfs_rtgroup.c
> +++ b/fs/xfs/libxfs/xfs_rtgroup.c
> @@ -547,6 +547,25 @@ xfs_rtginode_irele(
> *ipp = NULL;
> }
>
> +struct xfs_rtginode_create {
> + struct xfs_rtgroup *rtg;
> + enum xfs_rtg_inodes type;
> + bool init;
> +};
> +
> +static int
> +xfs_rtginode_init(
> + struct xfs_metadir_update *upd,
> + void *priv)
> +{
> + struct xfs_rtginode_create *rc = priv;
> + const struct xfs_rtginode_ops *ops = &xfs_rtginode_ops[rc->type];
> +
> + xfs_rtginode_lockdep_setup(upd->ip, rtg_rgno(rc->rtg), rc->type);
> + upd->ip->i_projid = rtg_rgno(rc->rtg);
> + return ops->create(rc->rtg, upd->ip, upd->tp, rc->init);
> +}
The double indirection is a bit annoying, but given that this is not
a performance pass not a major issue. I can't really hink of a good
way to get rid of it either.
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
Please add another patch at the end to mark xfs_metadir_start_create,
xfs_metadir_create and xfs_metadir_cancel static.
prev parent reply other threads:[~2026-07-13 6:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-12 9:33 [PATCH 0/3] xfs: consolidate metadir creation code Johannes Thumshirn
2026-07-12 9:33 ` [PATCH 1/3] xfs: add xfs_metadir_create_file helper Johannes Thumshirn
2026-07-13 6:51 ` Christoph Hellwig
2026-07-12 9:33 ` [PATCH 2/3] xfs: create quota metadir inodes using xfs_metadir_create_file Johannes Thumshirn
2026-07-13 6:55 ` Christoph Hellwig
2026-07-12 9:33 ` [PATCH 3/3] xfs: create rtgroup " Johannes Thumshirn
2026-07-13 6:58 ` Christoph Hellwig [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=20260713065801.GJ29416@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=dlemoal@kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-xfs@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.