Back during the Linux 7.2 merge window the Btrfs file-system dropped its COW fixup mechanism, which was used to detect dirty pages without an ordered extent. This code was removed as it was believed the kernel's memory management layer had solved the underlying conditions but in reality it ended up leading to silent data loss. That Btrfs fixup worker infrastructure is now restored in time for Linux 7.2-rc7 this weekend and the stable v7.2 kernel later this month. SUSE's David Sterba sent in a pull request today dedicated to bringing back the fixup worker infrastructure. It's a big change for late in the kernel cycle with restoring 600+ lines of feature code, but as Sterba noted without it can lead to silent data loss in current conditions: "this pull request brings back the fixup worker infrastructure. It's a mechanism to detect pages/folios that are marked dirty without filesystem knowledge and require COW fixup. The consequence of not doing so is silent data loss. The first patch covers the scenarios in detail, also reflecting folio API port and subpage block size support added in recent years. The original fixup worker was only for pages. The patch is relatively big, half of the code is debugging and support code, the rest is the core design around the detection and fix." Linus Torvalds has already honored the pull request with the restored infrastructure now in Linux Git. There was a separate pull request today as well containing the other Btrfs fixes for the week. That Btrfs pull landed a fix for a leak in the encoded ioctl write, disabling large folios on systems with highmem, and disabling block size greater than page size support for systems without transparent hugepage (THP) support.
Linux 7.2-rc7 Restoring Btrfs Fixup Worker Infrastructure To Address Silent Data Loss
Full Article
Original Source
Read the full article at Phoronix →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.