Re: [PATCH v2 18/20] drbd: add the "drbd2" genl family

From: Christoph Böhmwalder

Date: Tue Oct 06 2026 - 12:06:45 EST


On 10/6/26 17:46, Christoph Böhmwalder wrote:
DRBD 9's utilities need the multi-peer administration model that the
version-1 wire cannot express: peers identified by node id, several
paths per connection, per-peer-device options and statistics, and
notifications for all of those. Rather than bump the "drbd" family
and break every existing drbd-utils, add a second family, "drbd2",
written as a YNL specification in Documentation/netlink/specs/ and
following current generic netlink conventions: strict policies with
ranges, nested objects, split do/dump ops, extended ACKs for errors,
and a proper uapi header.

drbd2_nl_gen.[ch] and include/uapi/linux/drbd2.h are generated from
the spec with tools/net/ynl and are not edited by hand.
drbd_nl_drbd2.c is the struct drbd_nl_dialect adapter for the family.
Both families are registered by the same driver and operate on the
same objects; a resource created through either is visible through
both, within what each wire format can express. drbd2 is always
registered, so with DRBD_COMPAT_84=n it is the only family.

Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@xxxxxxxxxx>
---
Documentation/netlink/specs/drbd2.yaml | 2476 +++++++++++++++++++++++
drivers/block/drbd/Kconfig | 6 +
drivers/block/drbd/Makefile | 1 +
drivers/block/drbd/drbd2_nl_gen.c | 748 +++++++
drivers/block/drbd/drbd2_nl_gen.h | 107 +
drivers/block/drbd/drbd_nl_drbd2.c | 2533 ++++++++++++++++++++++++
include/uapi/linux/drbd2.h | 1012 ++++++++++
7 files changed, 6883 insertions(+)
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_nl_drbd2.c
create mode 100644 include/uapi/linux/drbd2.h
Also CCing the YNL maintainers here. Original link:
https://lore.kernel.org/linux-block/20261006154607.3936501-19-christoph.boehmwalder@xxxxxxxxxx/