DRBD Driver Working To Land ~15 Years Worth Of Changes Into The Linux Kernel
- Reference: 0001623237
- News link: https://www.phoronix.com/news/DRBD-15-Years-Code-Changes
- Source link:
DRBD was accepted to the mainline kernel back in 2009 but for well over a decade hasn't been maintained too well while the out-of-tree code has continued to progress for mirroring block storage devices between hosts. During this time DRBD out-of-tree has continued to be maintained by the commercial company LINBIT focused on enterprise software-defined storage. Engineers at LINBIT are now working to reduce that delta against the upstream kernel code.
Following the proposed 7,260 lines of code changes to the DRBD block device driver causing issues in Linux-Next, it was [1]suggested a better approach of vetting and code review via a topic branch in the Linux block subsystem until the code is ultimately ready for mainline. Linux block maintainer Jens Axboe suggested there:
"How about this - rebase it against for-7.1/block, and send the series. I can stash it in for-7.1/drbd, which can go into for-next. Then the separate tree can be dropped.
I won't submit the changes in for-7.1/drbd, but just expect you to send a new series against for-7.2/block when that is a thing. The 7.2 one should be closer to going upstream, and so forth. Within a few revisions of the mainline kernel, we'll get to the point where for-7.x/drbd can be included in the merge window pull request as well,
and we're done at that point and future drbd changes will just get submitted against for-7.x/block like any other block driver."
So sent out today was [2]this patch series for reworking the DRBD driver. Christoph Böhmwalder of LINBIT explained with the patch series:
"This replays about 10-15 years of active out-of-tree development work, depending on your way of counting. The out-of-tree module has severely diverged from the in-tree version over the years, which is what we are aiming to fix now.
Hopefully that somewhat excuses (or at least explains) the massive diffs -- we've tried to come up with a way to group the changes by topic, but I realize it's still not exactly trivial to review.
We've been polishing this series for a while now, and we have taken great care to make it as "upstream-presentable" as possible. That said, there are still probably imperfections. It's a start -- feedback welcome!
The main blocker that still remains 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 (v8 and v9 genetlink families are completely incompatible). We will fix that by introducing a completely new genetlink family (think "drbd2") that follows all modern conventions. Then we can 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 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 to take it at least closer to the out-of-tree driver code.
For those unfamiliar with how DRBD functions and curious, the [3]LINBIT site has more details on the architecture.
[1] https://lore.kernel.org/linux-next/899e0337-9642-4ca6-9050-aeab14fa22ef@kernel.dk/
[2] https://lore.kernel.org/lkml/20260327223820.2244227-1-christoph.boehmwalder@linbit.com/
[3] https://linbit.com/drbd/