From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Andrey Albershteyn <aalbersh@kernel.org>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/3] libxfs: better describe why m_ddev_targp can be set in libxfs_buftarg_init
Date: Fri, 11 Sep 2026 07:53:52 -0700 [thread overview]
Message-ID: <20260911145352.GD6265@frogsfrogsfrogs> (raw)
In-Reply-To: <20260911144559.1959740-3-hch@lst.de>
On Fri, Sep 11, 2026 at 04:45:43PM +0200, Christoph Hellwig wrote:
> I had to wade through this to understand what is going on here, so dump
> the thoughts in a comment to make it easier for the next person to
> understand the logic.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> libxfs/init.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/libxfs/init.c b/libxfs/init.c
> index 2a46ddf086ed..a47e610934e9 100644
> --- a/libxfs/init.c
> +++ b/libxfs/init.c
> @@ -534,7 +534,12 @@ libxfs_buftarg_init(
> }
>
> if (mp->m_ddev_targp) {
> - /* should already have all buftargs initialised */
> + /*
> + * This can happen if the utility called libxfs_buftarg_init
> + * manually before libxfs_mount, which calls us again.
That's much clearer about how we get into this state. :)
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> + *
> + * In this case all buftargs should be initialized already.
> + */
> if (mp->m_ddev_targp->bt_bdev != xi->data.dev ||
> mp->m_ddev_targp->bt_mount != mp) {
> fprintf(stderr,
> --
> 2.53.0
>
>
next prev parent reply other threads:[~2026-09-11 14:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 14:45 fix missing RT detection in libxfs Christoph Hellwig
2026-09-11 14:45 ` [PATCH 1/3] libxfs: don't set mp->m_rtdev_targp when no RT devices is provided Christoph Hellwig
2026-09-11 14:57 ` Darrick J. Wong
2026-09-11 15:11 ` Christoph Hellwig
2026-09-11 15:30 ` Darrick J. Wong
2026-09-11 15:38 ` Christoph Hellwig
2026-09-11 14:45 ` [PATCH 2/3] libxfs: better describe why m_ddev_targp can be set in libxfs_buftarg_init Christoph Hellwig
2026-09-11 14:53 ` Darrick J. Wong [this message]
2026-09-11 14:45 ` [PATCH 3/3] libxfs: remove buftarg member aliases Christoph Hellwig
2026-09-11 14:53 ` Darrick J. Wong
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=20260911145352.GD6265@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=aalbersh@kernel.org \
--cc=hch@lst.de \
--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.