From: Christoph Hellwig <hch@lst.de>
To: cem@kernel.org
Cc: linux-xfs@vger.kernel.org, david@fromorbit.com, hch@lst.de,
djwong@kernel.org
Subject: Re: [PATCH 3/3] xfs: remove owner field from xfs_extent_busy
Date: Tue, 10 Mar 2026 14:06:37 +0100 [thread overview]
Message-ID: <20260310130637.GC4151@lst.de> (raw)
In-Reply-To: <20260310123324.339310-4-cem@kernel.org>
On Tue, Mar 10, 2026 at 01:33:16PM +0100, cem@kernel.org wrote:
> From: Carlos Maiolino <cem@kernel.org>
>
> Now that xfs_busy_extents is not embedded into a cil context, we can
> get rid of the owner field.
>
> The struct will be freed upon a call to xfs_discard_extents(), whether
> at IO completion or by direct calling xfs_discard_endio_work().
>
> What reamains is xlog_cil_commited now being responsible for freeing
> the context itself.
>
> Worth mentioning that the busy extents still need to be manually freed
> during filesystem shutdown via xlog_cil_destroy() if there is a
> remaining context there.
>
> Also, xlog_cil_committed() now unconditionally calls xfs_discard_extents.
> This seems safe because it can handle an empty list, and as a bonus,
> it will call xfs_discard_endio_work() for such case, without any extra
> wiring needed to free the busy extents list in case it is empty.
> xfs_discard_endio_work() is also able to properly handle the empty list.
Looking at this series, it feels almost like this should be mostly
merged with the previous patch, with a small caveat:
>
> xlog_cil_free_logvec(&ctx->lv_chain);
>
> - if (!list_empty(&ctx->busy_extents->extent_list)) {
> - ctx->busy_extents->owner = ctx;
> - xfs_discard_extents(mp, ctx->busy_extents);
> - return;
> - }
> -
> - xfs_busy_extents_free(ctx->busy_extents);
> + xfs_discard_extents(mp, busy_extents);
I'd probably split this part out as it really neeѕs an explanation
and seems to be something taking advantage of the new dynamic
allocation scheme.
prev parent reply other threads:[~2026-03-10 13:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 12:33 [PATCH 0/3] Decouple busy_extents from cil context cem
2026-03-10 12:33 ` [PATCH 1/3] xfs: add a couple helpers to alloc/free xfs_busy_extents cem
2026-03-10 13:03 ` Christoph Hellwig
2026-03-10 12:33 ` [PATCH 2/3] xfs: convert busy_extents list to a pointer within cil context cem
2026-03-10 13:04 ` Christoph Hellwig
2026-03-10 12:33 ` [PATCH 3/3] xfs: remove owner field from xfs_extent_busy cem
2026-03-10 13:06 ` 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=20260310130637.GC4151@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox