Re: [PATCH v2 00/21] buffer: stop clearing BH_Uptodate when a write fails

From: Christian Brauner

Date: Mon Aug 31 2026 - 04:31:27 EST


On Thu, 06 Aug 2026 12:58:23 -0400, Chao Shi wrote:
> buffer: stop clearing BH_Uptodate when a write fails
>
> When a metadata write fails, the buffer_head completion handlers clear
> BH_Uptodate. The buffer still holds exactly the data the filesystem asked
> to be written - it is the disk that is stale, not the buffer - and saying
> otherwise has consequences:
>
> [...]

Tbh, the commit message reads a bit LLMy. It would be nice if people
could take the time - provided they have sufficient language skills - to
massage the artificial tone out of them.

---

Applied to the vfs-7.4.bh branch of the vfs/vfs.git tree.
Patches in the vfs-7.4.bh branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.4.bh

[01/21] buffer_head: Remove b_page
https://git.kernel.org/vfs/vfs/c/719ecb98ffe7
[02/21] buffer: allow a buffer_head to point at memory outside the page cache
https://git.kernel.org/vfs/vfs/c/8deae2284976
[03/21] jbd2: point the shadow buffer at the frozen data directly
https://git.kernel.org/vfs/vfs/c/5febcba29792
[04/21] buffer: read the folio's mapping directly in buffer_set_crypto_ctx()
https://git.kernel.org/vfs/vfs/c/14cbade7d773
[05/21] buffer: clear BH_Write_EIO when a buffer is forgotten
https://git.kernel.org/vfs/vfs/c/d59fe9111f4f
[06/21] buffer: discard BH_Write_EIO along with the rest of the buffer state
https://git.kernel.org/vfs/vfs/c/bbcd6f7456b2
[07/21] buffer: detect metadata write errors with buffer_write_io_error()
https://git.kernel.org/vfs/vfs/c/7032ded0a1fa
[08/21] adfs: check for a directory write error with buffer_write_io_error()
https://git.kernel.org/vfs/vfs/c/613e12102111
[09/21] ext2: check for an xattr block write error with buffer_write_io_error()
https://git.kernel.org/vfs/vfs/c/583913a40f2e
[10/21] omfs: check for an inode write error with buffer_write_io_error()
https://git.kernel.org/vfs/vfs/c/a269f6fade99
[11/21] exfat: check for a directory write error with buffer_write_io_error()
https://git.kernel.org/vfs/vfs/c/4a53ece574b5
[12/21] fat: check for a metadata write error with buffer_write_io_error()
https://git.kernel.org/vfs/vfs/c/a93ff8e2e398
[13/21] ext4: check for a metadata write error with buffer_write_io_error()
https://git.kernel.org/vfs/vfs/c/0f44b420e6c7
[14/21] ocfs2: check for a metadata write error with buffer_write_io_error()
https://git.kernel.org/vfs/vfs/c/3f90f64f8187
[15/21] ocfs2: check for a stale write error before reusing a metadata buffer
https://git.kernel.org/vfs/vfs/c/a87462d7b604
[16/21] gfs2: check for a metadata write error with buffer_write_io_error()
https://git.kernel.org/vfs/vfs/c/47552ff5ebf9
[17/21] jbd2: report journal write errors with BH_Write_EIO
https://git.kernel.org/vfs/vfs/c/0c6c46fbf4d8
[18/21] jbd2: say what jbd2_freeze_jh_data()'s assertion is actually checking
https://git.kernel.org/vfs/vfs/c/50cf8c8e532c
[19/21] ext4, jbd2: report fast commit write errors with BH_Write_EIO
https://git.kernel.org/vfs/vfs/c/a49d8a9d5d49
[20/21] buffer: stop touching BH_Uptodate on write completion
https://git.kernel.org/vfs/vfs/c/1f2304e87b83
[21/21] buffer: clear BH_Write_EIO when a write succeeds, not when one starts
https://git.kernel.org/vfs/vfs/c/e038f1016c6f