From: "Theodore Ts'o" <tytso@mit.edu>
To: Krister Johansen <kjlx@templeofstupid.com>
Cc: "Windl, Ulrich" <u.windl@ukr.de>,
"util-linux@vger.kernel.org" <util-linux@vger.kernel.org>,
Karel Zak <kzak@redhat.com>,
"systemd-devel@lists.freedesktop.org"
<systemd-devel@lists.freedesktop.org>,
David Reaver <me@davidreaver.com>
Subject: Re: [EXT] [systemd-devel] [PATCH] libblkid: fix spurious ext superblock checksum mismatches
Date: Tue, 19 Nov 2024 22:07:13 -0800 [thread overview]
Message-ID: <20241120060713.GE3484088@mit.edu> (raw)
In-Reply-To: <20241119235953.GA1865@templeofstupid.com>
On Tue, Nov 19, 2024 at 03:59:53PM -0800, Krister Johansen wrote:
>
> Thanks for the additional detail on jbd2's involvement. When I
> originally encountered this, it was on a 5.15 kernel where
> ext4_commit_super() was still using mark_buffer_dirty() prior to
> submitting the IO for the superblock write. I had managed to convince
> myself that ext4_commit_super() holding the BH_lock combined with
> O_DIRECT waiting for the dirty buffers associated with the superblock to
> get written was sufficient to get a consistent read of the superblock.
> I missed that this was changed as part of another bugfix[1].
Actually, even in 5.15, ext4_commit_super() only gets used (a) during
the mount paths before the journal has been initialized, (b) in the
umount code paths after the journal has been shutdown, (c) for file
systems without a journal, or (d) when the journal update has failed ---
for example, if the journal was aborted due to catastrophic failure.
Most of the time during normal operation, say, when the file system is
being resized, or the orphan list is being actively manipulated during
a huge number of unlinks or truncates, or changing the UUID using
EXT4_IOC_SETFSUUID, etc., the kernel updates the superblock using a
jbd2 transaction, and not ext4_commit_super(). So the change which
you cited in [1] doesn't make a change in practice unless the journal
can't be used for some reason.
If I remember correctly, the patch submitter for [1] hit the problem
they were trying to fix after a journal abort while they were doing
fault injection to test I/O error handling. (In other words, case (d)
above.)
- Ted
> [1] https://lore.kernel.org/all/20220520023216.3065073-1-yi.zhang@huawei.com/
next prev parent reply other threads:[~2024-11-20 6:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 20:35 [PATCH] libblkid: fix spurious ext superblock checksum mismatches Krister Johansen
2024-11-18 22:36 ` [systemd-devel] " Lennart Poettering
2024-11-18 23:13 ` Krister Johansen
2024-11-19 8:19 ` [EXT] " Windl, Ulrich
2024-11-19 8:15 ` [EXT] " Windl, Ulrich
2024-11-19 17:49 ` Theodore Ts'o
2024-11-19 23:59 ` Krister Johansen
2024-11-20 6:07 ` Theodore Ts'o [this message]
2024-11-21 10:44 ` Karel Zak
2024-11-21 15:55 ` Theodore Ts'o
2024-11-22 8:54 ` Krister Johansen
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=20241120060713.GE3484088@mit.edu \
--to=tytso@mit.edu \
--cc=kjlx@templeofstupid.com \
--cc=kzak@redhat.com \
--cc=me@davidreaver.com \
--cc=systemd-devel@lists.freedesktop.org \
--cc=u.windl@ukr.de \
--cc=util-linux@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