DRBD Driver Revamp: 15 Years of Changes Heading to Linux Kernel

DRBD Driver Revamp: 15 Years of Changes Heading to Linux Kernel

DRBD Driver Revamp: 15 Years of Changes Heading to Linux Kernel

The Distributed Replicated Block Device (DRBD) is undergoing a significant overhaul. Developers are working to merge approximately 15 years’ worth of changes into the Linux kernel. This undertaking aims to resync the upstream Linux kernel DRBD support with the out-of-tree DRBD code.

Background and Motivation

DRBD was initially accepted into the mainline kernel in 2009. However, it hasn’t been well-maintained over the past decade. Meanwhile, the out-of-tree code has continued to evolve, driven by the commercial company LINBIT, which focuses on enterprise software-defined storage. The goal now is to reduce the delta between the out-of-tree code and the upstream kernel code.

For example, the proposed 7,260 lines of code changes to the DRBD block device driver have been causing issues in Linux-Next. To address this, a better approach has been suggested, involving vetting and code review via a topic branch in the Linux block subsystem.

Proposed Solution and Timeline

Linux block maintainer Jens Axboe has proposed a step-by-step approach. This involves rebasing the code against for-7.1/block, sending the series, and then stashing it in for-7.1/drbd. The separate tree can then be dropped, and the process repeated until the code is ready for mainline.

Christoph Böhmwalder of LINBIT explained that this patch series replays about 10-15 years of active out-of-tree development work. The out-of-tree module has severely diverged from the in-tree version over the years, which is what they are aiming to fix now.

Challenges and Future Plans

One of the main blockers is that this technically breaks userspace: some ancient versions of the DRBD userspace utilities will not be able to talk to this version of the driver. To address this, a completely new genetlink family (think “drbd2”) will be introduced, following all modern conventions.

Additionally, the team will register both families, going through a compat layer for the old family. This code won’t be ready for upstream in the upcoming Linux 7.1 merge window, but the hope is that a few releases down the Linux 7.x line, the DRBD block driver code in the upstream kernel code will be ready for this much-needed modern refresh.

Meanwhile, users can learn more about how DRBD functions and its architecture on the LINBIT site. Furthermore, the community can expect regular updates on the progress of this significant overhaul.

Conclusion and Call to Action

In conclusion, the DRBD driver is undergoing a significant revamp, with 15 years’ worth of changes heading to the Linux kernel. This overhaul aims to bring the upstream kernel code up to par with the out-of-tree driver code. We encourage users to stay tuned for updates and to provide feedback on the proposed changes.

Finally, we invite readers to explore the LINBIT site for more information on DRBD and its applications. By working together, we can ensure a smoother transition and a more robust DRBD driver for the Linux community.