Bcachefs Ousted from Mainline Kernel: The Move to DKMS and What It Means

Bcachefs Ousted from Mainline Kernel: The Move to DKMS and What It Means

Introduction

After years of debate and development, bcachefs—a modern copy-on-write filesystem once merged into the Linux kernel—is being removed from mainline. As of kernel 6.17, the in-kernel implementation has been excised, and future use is expected via an out-of-tree DKMS module. This marks a turning point for the bcachefs project, raising questions about its stability, adoption, and relationship with the kernel development community.

In this article, we’ll explore the background of bcachefs, the sequence of events leading to its removal, the technical and community dynamics involved, and implications for users, distributions, and the filesystem’s future.

What Is Bcachefs?

Before diving into the removal, let’s recap what bcachefs is and why it attracted attention.

  • Origin & goals: Developed by Kent Overstreet, bcachefs emerged from ideas in the earlier bcache project (a block-device caching layer). It aimed to build a full-featured, general-purpose filesystem combining performance, reliability, and modern features (snapshots, compression, encryption) in a coherent design.

  • Mainline inclusion: Bcachefs was merged into the mainline kernel in version 6.7 (released January 2024) after a lengthy review and incubation period.

  • “Experimental” classification: Even after being part of the kernel, bcachefs always carried disclaimers about its maturity and stability—they were not necessarily recommends for production use by all users.

Its presence in mainline gave distributions a path to ship it more casually, and users had easier access without building external modules—an important convenience for adoption.

What Led to the Removal

The excision of bcachefs from the kernel was not sudden but the culmination of tension over development practices, patch acceptance timing, and upstream policy norms.

“Externally Maintained” status in 6.17

In kernel 6.17’s preparation, maintainers marked bcachefs as “externally maintained.” Though the code remained present, the change signified that upstream would no longer accept new patches or updates within the kernel tree.

This move allowed a transitional period. The code was “frozen” inside the tree to avoid breaking existing systems immediately, while preparation was made for future removal.

Disagreements & Last Straw: “journal_rewind” Patch

The decisive breakdown came during the 6.16 / 6.17 development cycle. The bcachefs lead submitted a major patch (called journal_rewind) late in the merge window—an addition rather than mere bug fixes. That move ran contrary to kernel community norms, which expect new features to be submitted before the merge window or in earlier cycles.

Linus Torvalds publicly expressed frustration that the bcachefs tree was increasingly becoming a development sandbox, rather than aligning with upstream policy. He complained that development was being done during release candidates instead of before, making it hard to maintain stability.

Eventually, Torvalds declared that he no longer wished to be involved in that dynamic, and that in the 6.17 merge window, bcachefs would be removed.

Final Removal

With Linux kernel version 6.18, the core bcachefs code was officially stripped out. The logic given was that the in-ci kernel copy had become stale, and continued presence would only create confusion about versions.

The removal eliminated approximately 117,000 lines of code from the kernel source tree.

What Now: DKMS & Out-of-Tree Approach

Following this removal, the bcachefs project pivoted to shipping as a DKMS module (Dynamic Kernel Module Support), meaning it lives outside the kernel tree and can be compiled and installed for various kernels on demand.

Some key points about this transition:

  • The module is designed for compatibility with kernel versions 6.16 and newer, and plans are to track kernel pre-releases for module support.

  • Users still can run bcachefs as root filesystem, provided that the initramfs includes the DKMS module to load early in the boot process.

  • Distributions that disallow shipping out-of-tree modules (for policy or security reasons) may limit bcachefs availability; some are providing it via community repositories (e.g. Debian / Ubuntu APT repos) or COPR in Fedora.

  • Performance comparisons suggest the DKMS version may perform better than the in-tree version in some benchmarks (Phoronix reports improvements).

Implications & Risks

The removal of bcachefs from mainline affects multiple stakeholders: users, distribution maintainers, and the bcachefs project itself.

For Users & Deployments
  • Users relying on bcachefs must adapt: they will need to install and maintain the DKMS module across kernel upgrades.

  • In some distros, that means more manual steps or reliance on community packaging.

  • There is a risk if the module fails to build or maintain compatibility with future kernel changes.

  • Some kernel-level optimizations or hooks may be harder to maintain with an out-of-tree module (because in-tree code can adapt deepest integrations more easily).

For Distributions
  • Some distributions (especially those with restrictive module policies) may drop upstream support or exclude bcachefs by default.

  • Distributions must decide whether to package DKMS, provide user instructions, or blacklist its use in stable kernels.

For bcachefs Maintenance & Development
  • Decoupling from the kernel gives more freedom: the project can release updates on its own schedule without being tied to kernel merge cycles.

  • But it also loses the visibility and integration benefits that an in-tree filesystem had.

  • There’s speculation that absence of in-kernel user references could lead to removal of related internal APIs or helper functions over time (i.e. code used only by bcachefs might be considered for removal).

  • The project must maintain strong testing, compatibility across kernel versions, and responsiveness to avoid regressions.

How the Removal Was Received

Community reactions are varied. Some sympathize that bcachefs’s development approach did not align well with kernel higher-level policies. Others are concerned about losing a promising filesystem that aimed to push forward features that other filesystems lacked.

Critics warn that future kernels might remove internal APIs that bcachefs depends on—since no in-tree user remains—to further weaken out-of-tree modules.

Some are optimistic: the DKMS path gives the project autonomy and may allow faster iteration and fixes without waiting on kernel merges.

What Users Should Do Now

If you’re using bcachefs or planning to:

  1. Check whether your current kernel still includes bcachefs or is already past 6.17/6.18.

  2. Prepare to install the DKMS version (look for “bcachefs-tools” packages or module sources) in your distribution’s repositories or via community packages.

  3. Be sure that your initramfs includes the module so the system can boot from bcachefs.

  4. Monitor compatibility in each kernel upgrade cycle—especially for builds or APIs you rely on.

  5. Watch for distributions’ support decisions—some may remove or restrict out-of-tree modules.

  6. For mission-critical setups, consider having fallback filesystem or migration paths if bcachefs becomes nonviable in your environment.

Conclusion

The removal of bcachefs from the mainline Linux kernel marks a turning point. While it may feel like a step backward for those who hoped for a fully integrated advanced filesystem, the move also liberates the project to evolve under its own terms. The DKMS model introduces flexibility, but also introduces risks around compatibility, distribution support, and long-term integration.

What remains to be seen is whether bcachefs can maintain momentum outside the kernel core — delivering stable, performant, and well-tested features. For users and Linux distributions, adapting to the new reality is essential.

George Whittaker is the editor of Linux Journal, and also a regular contributor. George has been writing about technology for two decades, and has been a Linux user for over 15 years. In his free time he enjoys programming, reading, and gaming.

Load Disqus comments