mirror of
https://github.com/torvalds/linux.git
synced 2026-10-23 23:51:02 +02:00
Please consider pulling these changes from the signed vfs-7.4-rc1.bh tag. Thanks! Christian -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCatHrlgAKCRCRxhvAZXjc ouV5AP0WoJkt78dAg29c1s5oPtTmeDzjZwXRcgG95LVb2V2x1gD7BKccTzIoivKQ BY+KdHWFpTrDD78+wWEkVosik2exxAw= =x2FH -----END PGP SIGNATURE----- Merge tag 'vfs-7.4-rc1.bh' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull buffer_head updates from Christian Brauner: "This stops the buffer_head write completion handlers from clearing BH_Uptodate when a write fails. A buffer whose write failed still holds exactly the data the filesystem asked to be written. It's the disk that is stale, not the buffer. Claiming otherwise has consequences. mark_buffer_dirty() warns when a filesystem redirties the buffer to retry the write, a buffer that isn't up to date gets re-read from disk which silently replaces the data with the stale on-disk copy, and the window between the write completing and BH_Uptodate being cleared is visible to anyone holding the folio lock. BH_Write_EIO already records that the last write failed. Every consumer is moved over to buffer_write_io_error(): the two core helpers in fs/buffer.c, adfs, ext2, omfs, exfat, fat, ext4, ocfs2, gfs2 and jbd2. Then write completion stops touching BH_Uptodate in both directions and BH_Write_EIO is cleared on successful completion instead of at submission, so a resubmission no longer hides an error that hasn't been fixed yet. bforget() and invalidation drop the flag so a reused block doesn't inherit someone else's write error. The groundwork for this removes b_page from struct buffer_head and lets a buffer_head point at memory outside the page cache. jbd2's shadow buffers sit on a slab folio today. A slab folio overloads ->mapping so mark_buffer_write_io_error() couldn't be called on them at all. They now point at the frozen data directly with b_folio NULL. Also included are documentation updates from Matthew for sb_bread(), sb_breadahead() and mmb_mark_buffer_dirty() and the removal of stale references to unmap_buffer() and mark_buffer_dirty_inode()" * tag 'vfs-7.4-rc1.bh' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (27 commits) buffer: Rename label buffer: Refer to folios in comments buffer: Document mmb_mark_buffer_dirty() buffer: Document sb_bread(), sb_bread_unmovable() and sb_breadahead() fs: Remove references to mark_buffer_dirty_inode() buffer: clear BH_Write_EIO when a write succeeds, not when one starts buffer: Remove reference to unmap_buffer() buffer: stop touching BH_Uptodate on write completion jbd2: check for a fast commit write error with buffer_write_io_error() jbd2: say what jbd2_freeze_jh_data()'s assertion is actually checking jbd2: report journal write errors with BH_Write_EIO gfs2: check for a metadata write error with buffer_write_io_error() ocfs2: check for a stale write error before reusing a metadata buffer ocfs2: check for a metadata write error with buffer_write_io_error() ext4: check for a metadata write error with buffer_write_io_error() fat: check for a metadata write error with buffer_write_io_error() exfat: check for a directory write error with buffer_write_io_error() omfs: check for an inode write error with buffer_write_io_error() ext2: check for an xattr block write error with buffer_write_io_error() adfs: check for a directory write error with buffer_write_io_error() ... |
||
|---|---|---|
| .. | ||
| acpi | ||
| asm-generic | ||
| clocksource | ||
| crypto | ||
| cxl | ||
| drm | ||
| dt-bindings | ||
| hyperv | ||
| keys | ||
| kunit | ||
| kvm | ||
| linux | ||
| math-emu | ||
| media | ||
| memory | ||
| misc | ||
| net | ||
| pcmcia | ||
| ras | ||
| rdma | ||
| rv | ||
| scsi | ||
| soc | ||
| sound | ||
| target | ||
| trace | ||
| uapi | ||
| ufs | ||
| vdso | ||
| video | ||
| xen | ||
| Kbuild | ||