From: sashiko-bot@kernel.org
To: guolingxing <guolingxing@tju.edu.cn>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH v2 2/3] jbd2: check return value of blkdev_issue_flush() when committing
Date: Tue, 13 Oct 2026 01:48:06 +0000 [thread overview]
Message-ID: <sashiko-outbox-168841@kernel.org> (raw)
In-Reply-To: <20261013014028.1152277-3-guolingxing@tju.edu.cn>
> For journals on a separate device, jbd2_commit_transaction() must
> flush the file system device before submitting the commit record,
> otherwise the transaction may get committed while the ordered data
> are still in the device cache. However the return value of
> blkdev_issue_flush() is ignored so if the flush fails, the commit
> record is still submitted and fsync() reports success although the
> ordered data may have never reached the disk. After a crash the
> journal recovery will consider such transactions committed and data
> written by fsync() may be lost.
>
> Abort the journal when the flush fails. The commit record is then
> not submitted anymore since journal_submit_commit_record() checks
> for an aborted journal.
>
> Fixes: cc3e1bea5d87 ("ext4, jbd2: Add barriers for file systems with exernal journals")
> Cc: stable@vger.kernel.org
> Signed-off-by: guolingxing <guolingxing@tju.edu.cn>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013014028.1152277-1-guolingxing@tju.edu.cn?part=2
next prev parent reply other threads:[~2026-10-13 1:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 11:47 [PATCH 1/3] jbd2: check return value of blkdev_issue_flush() when checkpointing guolingxing
2026-10-12 11:47 ` [PATCH 2/3] jbd2: check return value of blkdev_issue_flush() when committing guolingxing
2026-10-12 12:10 ` sashiko-bot
2026-10-12 15:31 ` Jan Kara
2026-10-12 11:47 ` [PATCH 3/3] jbd2: check return value of blkdev_issue_flush() for async commits guolingxing
2026-10-12 12:16 ` sashiko-bot
2026-10-12 15:33 ` Jan Kara
2026-10-12 12:03 ` [PATCH 1/3] jbd2: check return value of blkdev_issue_flush() when checkpointing sashiko-bot
2026-10-12 15:29 ` Jan Kara
2026-10-13 1:40 ` [PATCH v2 0/3] jbd2: check return value of blkdev_issue_flush() guolingxing
2026-10-13 1:40 ` [PATCH v2 1/3] jbd2: check return value of blkdev_issue_flush() when checkpointing guolingxing
2026-10-13 1:50 ` sashiko-bot
2026-10-13 1:40 ` [PATCH v2 2/3] jbd2: check return value of blkdev_issue_flush() when committing guolingxing
2026-10-13 1:48 ` sashiko-bot [this message]
2026-10-13 1:40 ` [PATCH v2 3/3] jbd2: check return value of blkdev_issue_flush() for async commits guolingxing
2026-10-13 1:49 ` sashiko-bot
2026-10-13 12:20 ` Jan Kara
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=sashiko-outbox-168841@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=guolingxing@tju.edu.cn \
--cc=linux-ext4@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tytso@mit.edu \
/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