From: Milos Nikic <nikic.milos@gmail.com>
To: jack@suse.cz
Cc: jack@suse.com, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org, nikic.milos@gmail.com,
tytso@mit.edu, yi.zhang@huaweicloud.com
Subject: Re: [PATCH] jbd2: gracefully abort instead of panicking on unlocked buffer
Date: Mon, 2 Mar 2026 08:21:36 -0800 [thread overview]
Message-ID: <20260302162136.38742-1-nikic.milos@gmail.com> (raw)
In-Reply-To: <u4zbebo5va2oxs3ggr5caspz5mklufrfx2rjjg4sw3vhm5d3pw@a5vd7a2ufarh>
Hi Jan,
No, I didn't trigger this in the wild. I have been auditing jbd2 for J_ASSERT usage to see where we could proactively swap hard panics for graceful journal aborts.
You are right that there are many similar asserts, but I focused on this one because it belongs to a specific, easily-actionable group: it resides in a function that already returns an error code (int).
Some of the other J_ASSERTs are buried inside void functions. Converting those to return errors would require cascading API changes and rewriting caller error-handling paths across the subsystem, which is a much bigger and riskier lift.
My goal was just to target the "low-hanging fruit" - the asserts where the function signature already supports returning an error (-EINVAL/-EIO) and aborting the journal safely without changing the API.
If you are open to it, I can audit the codebase for the rest of the asserts that fit this exact profile and submit them. Would you prefer them grouped into a single patch, or a short series?
Thanks,
Milos
prev parent reply other threads:[~2026-03-02 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 0:31 [PATCH] jbd2: gracefully abort instead of panicking on unlocked buffer Milos Nikic
2026-03-02 12:09 ` Zhang Yi
2026-03-02 13:07 ` Jan Kara
[not found] ` <CAOeJtk_JmASoSZQ_Y=qY155vQCXGnpqtXy8EPc3HA5yj4QFsJQ@mail.gmail.com>
2026-03-02 16:20 ` Jan Kara
2026-03-02 16:21 ` Milos Nikic [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=20260302162136.38742-1-nikic.milos@gmail.com \
--to=nikic.milos@gmail.com \
--cc=jack@suse.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yi.zhang@huaweicloud.com \
/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