From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
cem@kernel.org, stable@vger.kernel.org,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/5] xfs: always set xfs_healthmon::first_event when inserting at front of list
Date: Wed, 26 Aug 2026 06:48:20 +0200 [thread overview]
Message-ID: <20260826044820.GC14936@lst.de> (raw)
In-Reply-To: <20260825183308.GW6072@frogsfrogsfrogs>
On Tue, Aug 25, 2026 at 11:33:08AM -0700, Darrick J. Wong wrote:
> Let me try again:
>
> "LOLLM complains that while __xfs_healthmon_insert is supposed to insert
> an event at the head of the list, it doesn't do that correctly if the
> list isn't empty. In that case it *should* make our new event point to
> the current head, and then make the head point to the new event, but
> it doesn't actually update the head."
> > event is the newly inserted event. We want to queue it at the
> > head of the list (why, btw?).
>
> The only event that gets inserted at the front is the unmount event.
> This signals that the filesystem is being completely unmounted (not just
> detached from a mount ns) and there's nothing further that xfs_healer
> can do to fix the filesystem. Therefore we put the unmount item first
> in the list so that xfs_healer won't waste time trying to find the
> mount to do repairs that it won't be able to make.
Ok, me forgetting about two different ways to insert events was the
reason I had a really hard time with the commit log.
>
> > The next point in event points to
> > first_event (which can be NULL). And first should always point
> > to event, otherwise we potentially never queue anything up? I.e.
> > we never ever actually set first? Not sure how that is related
> > to umount.
>
> xfs_healthmon_push will set first_event if the list is empty.
>
> (for context, all other events are _pushed on to the end of the list)
>
> > Maybe this should just use standard list_head-based lists even
> > if they waste an extra pointer in the event structure?
>
> Yes, that at least wouldn't increase the size of xfs_healthmon_event.
I think we should do this. And merge __xfs_healthmon_push and
__xfs_healthmon_insert that has a at_head argument to switch between
list_add vs list_add_tail. Thart would make this code much easier
to understand and maintain.
next prev parent reply other threads:[~2026-08-26 4:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 5:34 [PATCHSET 2/2] xfs: LLM-inspired bug fixes, part 8 Darrick J. Wong
2026-08-25 5:36 ` [PATCH 1/5] xfs: always set xfs_healthmon::first_event when inserting at front of list Darrick J. Wong
2026-08-25 6:40 ` Christoph Hellwig
2026-08-25 18:33 ` Darrick J. Wong
2026-08-26 4:48 ` Christoph Hellwig [this message]
2026-08-26 4:54 ` Darrick J. Wong
2026-08-26 5:10 ` Christoph Hellwig
2026-08-25 5:36 ` [PATCH 2/5] xfs: check healthmon outbuffer space correctly Darrick J. Wong
2026-08-25 6:44 ` Christoph Hellwig
2026-08-25 18:36 ` Darrick J. Wong
2026-08-25 5:36 ` [PATCH 3/5] xfs: bump lost_prev_errors if we lose even the healthmon lost event Darrick J. Wong
2026-08-25 6:45 ` Christoph Hellwig
2026-08-25 5:36 ` [PATCH 4/5] xfs: report nonexistent parents as a filesystem corruption Darrick J. Wong
2026-08-25 6:46 ` Christoph Hellwig
2026-08-25 5:37 ` [PATCH 5/5] xfs: destroy seen inode bitmap when we fail to add a dirpath Darrick J. Wong
2026-08-25 6:48 ` Christoph Hellwig
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=20260826044820.GC14936@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@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