As discussed (context: [0]), here is our DRBD 9 rework series, intended for linux-next via for-7.x/drbd.
This replays about 10-15 years of active out-of-tree development work [1], 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 netlink interface has been reworked so that userspace is not broken: the existing "drbd" generic netlink family keeps being served at version 1, and this series does not touch its generated serialization or its UAPI header. Every shipped drbd-utils release therefore keeps working against this driver. DRBD 9's own utilities speak a new family, "drbd2", written as a YNL specification under Documentation/netlink/specs/ and following current genetlink conventions; its generated code is checked in as usual. The driver registers both families and translates each onto the same wire-neutral core, so the multi-peer administration model is only reachable through drbd2, while version-1 clients see the single-peer semantics they expect. The RDMA and load-balancing TCP (lb-tcp) transports are not part of this series; they will be submitted separately once they have had the same treatment. The rdma_ctrl_rcvbuf_size and rdma_ctrl_sndbuf_size net options do remain in the UAPI: they are generic transport options that are interpreted by whichever transport is in use, so there is no reason to remove and later re-add them. The base for these patches is for-7.5/block, which has the preparation patches [2] this series builds on. As discussed, the goal is to get this applied to a for-7.x/drbd branch so it can land in linux-next via block-next. After letting it mature in linux-next for a while, it should go in via the block tree. Thanks, Christoph [0] https://lore.kernel.org/linux-next/[email protected]/ [1] https://github.com/LINBIT/drbd [2] https://lore.kernel.org/linux-block/[email protected]/ v2: https://lore.kernel.org/linux-block/[email protected]/ Changes since v2: - Rebased onto for-7.5/block, now that the preparation patches are applied there; v2 no longer applied - Kept the in-tree DRBD changes that went into v7.4: the explicit linux/umh.h include and the conversion to sk_set_nospace() - Synced with the current out-of-tree state Christoph Böhmwalder (20): drbd: mark as BROKEN during DRBD 9 rework drbd: extend wire protocol definitions for DRBD 9 drbd: introduce DRBD 9 on-disk metadata format drbd: add transport layer abstraction drbd: add TCP transport implementation drbd: add DAX/PMEM support for metadata access drbd: add optional compatibility layer for DRBD 8.4 drbd: add application/resync IO synchronization documentation drbd: rework sender for DRBD 9 multi-peer drbd: replace per-device state model with multi-peer data structures drbd: rewrite state machine for DRBD 9 multi-peer clusters drbd: rework activity log and bitmap for multi-peer replication drbd: rework request processing for DRBD 9 multi-peer IO drbd: rework module core for DRBD 9 transport and multi-peer drbd: rework receiver for DRBD 9 transport and multi-peer protocol drbd: rework the netlink core for DRBD 9 drbd: serve the "drbd" genl family at version 1 for existing userspace drbd: add the "drbd2" genl family drbd: update monitoring interfaces for multi-peer topology drbd: remove BROKEN for DRBD .../application-resync-synchronization.rst | 208 + .../admin-guide/blockdev/drbd/index.rst | 1 + Documentation/netlink/specs/drbd2.yaml | 2600 +++ drivers/block/drbd/Kconfig | 43 + drivers/block/drbd/Makefile | 9 +- drivers/block/drbd/drbd2_nl_gen.c | 810 + drivers/block/drbd/drbd2_nl_gen.h | 113 + drivers/block/drbd/drbd_actlog.c | 1373 +- drivers/block/drbd/drbd_bitmap.c | 2075 +- drivers/block/drbd/drbd_config.h | 45 +- drivers/block/drbd/drbd_dax_pmem.c | 175 + drivers/block/drbd/drbd_dax_pmem.h | 43 + drivers/block/drbd/drbd_debugfs.c | 1758 +- drivers/block/drbd/drbd_debugfs.h | 2 + drivers/block/drbd/drbd_int.h | 3930 ++-- drivers/block/drbd/drbd_interval.c | 37 +- drivers/block/drbd/drbd_interval.h | 130 +- drivers/block/drbd/drbd_legacy_84.c | 641 + drivers/block/drbd/drbd_legacy_84.h | 116 + drivers/block/drbd/drbd_main.c | 6812 ++++-- drivers/block/drbd/drbd_meta_data.h | 170 + drivers/block/drbd/drbd_nl.c | 10232 ++++++--- drivers/block/drbd/drbd_nl.h | 400 + drivers/block/drbd/drbd_nl_84.c | 3622 ++++ drivers/block/drbd/drbd_nl_defaults.c | 168 + drivers/block/drbd/drbd_nl_drbd2.c | 2589 +++ drivers/block/drbd/drbd_nl_types.h | 402 + drivers/block/drbd/drbd_polymorph_printk.h | 37 +- drivers/block/drbd/drbd_proc.c | 327 +- drivers/block/drbd/drbd_protocol.h | 614 +- drivers/block/drbd/drbd_receiver.c | 17304 ++++++++++++---- drivers/block/drbd/drbd_req.c | 3188 ++- drivers/block/drbd/drbd_req.h | 332 +- drivers/block/drbd/drbd_sender.c | 4445 ++-- drivers/block/drbd/drbd_state.c | 9203 ++++++-- drivers/block/drbd/drbd_state.h | 334 +- drivers/block/drbd/drbd_state_change.h | 80 +- drivers/block/drbd/drbd_strings.c | 103 +- drivers/block/drbd/drbd_strings.h | 4 +- drivers/block/drbd/drbd_transport.c | 545 + drivers/block/drbd/drbd_transport.h | 487 + drivers/block/drbd/drbd_transport_tcp.c | 1805 ++ drivers/block/drbd/drbd_transport_template.c | 164 + include/uapi/linux/drbd.h | 305 +- include/uapi/linux/drbd2.h | 1038 + include/uapi/linux/drbd_limits.h | 138 +- 46 files changed, 61765 insertions(+), 17192 deletions(-) create mode 100644 Documentation/admin-guide/blockdev/drbd/application-resync-synchronization.rst create mode 100644 Documentation/netlink/specs/drbd2.yaml create mode 100644 drivers/block/drbd/drbd2_nl_gen.c create mode 100644 drivers/block/drbd/drbd2_nl_gen.h create mode 100644 drivers/block/drbd/drbd_dax_pmem.c create mode 100644 drivers/block/drbd/drbd_dax_pmem.h create mode 100644 drivers/block/drbd/drbd_legacy_84.c create mode 100644 drivers/block/drbd/drbd_legacy_84.h create mode 100644 drivers/block/drbd/drbd_meta_data.h create mode 100644 drivers/block/drbd/drbd_nl.h create mode 100644 drivers/block/drbd/drbd_nl_84.c create mode 100644 drivers/block/drbd/drbd_nl_defaults.c create mode 100644 drivers/block/drbd/drbd_nl_drbd2.c create mode 100644 drivers/block/drbd/drbd_nl_types.h create mode 100644 drivers/block/drbd/drbd_transport.c create mode 100644 drivers/block/drbd/drbd_transport.h create mode 100644 drivers/block/drbd/drbd_transport_tcp.c create mode 100644 drivers/block/drbd/drbd_transport_template.c create mode 100644 include/uapi/linux/drbd2.h base-commit: aa7014f8d7565cfea117eac36a5de0a05eba65a4 -- 2.56.0
