The author of Bcachefs has presented patches to fix the filesystem damaged by a recent error.

Kent Overstreet, the Bcachefs filesystem developer, proposed patches that enable the Linux kernel to work with the Bcachefs filesystem even after significant metadata damage, reconstructing corrupted b-trees from inode and dirent structures when necessary. The changes have been accepted by Linus Torvalds and included in today's test update of kernel 6.9-rc3.

The changes allow for the mounting of damaged filesystems and provide access to all or nearly all data in the filesystem affected by a recent bug that led to filesystem corruption. The bug manifested when an attempt was made to update filesystem structures after updating the tooling, but it was not completed, causing the kernel with the old Bcachefs implementation to attempt a downgrade of the structures, ignoring the incomplete update. This situation led to a 'split brain mode', where neither operation could be completed, and the b-tree structures of the filesystem were no longer consistent with the actual content.

The mentioned patch allows for continued operation even in such cases. Among the limitations of the technology, it is noted that if snapshots are present, the snapshot b-tree must also be intact.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster