Kent Overstreet has published the Bcachefs 1.33.0 file system. The release includes two packages: bcachefs-kernel-dkms, which contains a kernel module built using the Dynamic Kernel Module Support (DKMS) system, and bcachefs-tools, which contains the user-space bcachefs utility, which implements commands for creating (mkfs), mounting, restoring, and verifying the file system. The packages are compiled for Debian, Ubuntu, Fedora, openSUSE, NixOS and Arch LinuxThe DKMS module supports working with kernels Linux, starting from 6.16.
The new version adds "reconcile" functionality (rebalance_v2), which is considered the largest change to the file system in the last two years. Unlike the previously available "rebalance" mode, the "reconcile" mechanism allows for rebalancing not only data (for example, replicating multiple copies to different drives) but also file system metadata (for example, to migrate metadata after adding an additional drive to the pool). Furthermore, reconcile now applies to all I/O options, not just background copy and compression operations. Reconcile also automatically accounts for changes to device options or settings and immediately re-replicates degraded data and metadata.
Reconcile uses separate indexes for: high-priority operations; optimization of data processing on disk drives; and data scheduled for processing that is currently unavailable (for example, due to lack of space). Support has been added for creating a file system on a single drive in dual replication mode (replicas=2). In this configuration, adding a second drive will automatically replicate data to the added drive, without any user interaction.
Among other changes:
- Added the "reconcile status" and "reconcile wait" commands. Added the "mount_trusts_udev" and "writeback_timeout" mount options. Deprecated the "data rereplicate" and "data job drop_extra_replicas" commands.
- Added a "merge_btree_nodes" recovery mode that checks all nodes in btree structures subject to merge operations.
- The code has been prepared for the transition to the Rust language. The number of goto operations used in the code has been reduced from 2500 to 600. Openly coded vectors have been replaced with the DARRAY() macro, which provides functionality similar to dynamic arrays in C++ and Rust. Error handling is handled using the try() macro, borrowed from Rust.
- The "bcachefs fs usage" command now correctly reports degraded data.
- The handling of counters displayed by the "bcachefs fs top" command has been reworked. Adding new counters has been simplified, and the ability to convert tracepoints to printbufs has been implemented.
- The quality of error messages has been improved. They now include information about the types of failures (software or hardware), actions to resolve the error (e.g., starting a recovery process), I/O error codes received from block devices, and missing devices. When scanning btree structures, information about whether problem nodes can be recovered is now displayed.
- When writing to the log, the ability to separately define limits on the output intensity of different error types has been added. These limits prevent messages about isolated hardware problems from being lost amid a large number of software error messages.
- Progress indicators have been added for all recovery stages.
The Bcachefs project is developing a file system aimed at combining the advanced functionality of Btrfs and ZFS with the performance, reliability, and scalability of XFS. Bcachefs supports features such as multiple devices per partition, multi-layered drive layouts (the bottom layer with frequently accessed data based on fast SSDs, and the top layer with less frequently accessed data from hard drives), replication (RAID 1/10), caching, transparent data compression (LZ4, gzip, and ZSTD modes), state slices (snapshots), integrity verification using checksums, the ability to store Reed-Solomon error correction codes (RAID 5/6), and encrypted data storage (using ChaCha20 and Poly1305). In terms of performance, Bcachefs outperforms Btrfs and other file systems based on the Copy-on-Write mechanism, and demonstrates operating speed close to Ext4 and XFS.
Source: opennet.ru
