Skip to content

RDMA/rmr: add public and private headers#797

Open
blktests-ci[bot] wants to merge 13 commits intolinus-master_basefrom
series/1089693=>linus-master
Open

RDMA/rmr: add public and private headers#797
blktests-ci[bot] wants to merge 13 commits intolinus-master_basefrom
series/1089693=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented May 5, 2026

Pull request for series with
subject: RDMA/rmr: add public and private headers
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1089693

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 5, 2026

Upstream branch: 6d35786
series: https://patchwork.kernel.org/project/linux-block/list/?series=1089693
version: 1

Reliable Multicast over RTRS (RMR) is an RDMA ULP that provides
active-active block-level replication on top of the RTRS transport.
It guarantees delivery of an I/O to a group of storage nodes and
handles resynchronization of data between storage nodes without
involving the compute client.

Add the public interface header (rmr.h) used by upper-layer
consumers, plus the private headers shared between the client and
server modules:

  rmr-proto.h	wire protocol definitions
  rmr-pool.h	pool data structures
  rmr-map.h	dirty-map data structures
  rmr-req.h	server-side request lifecycle helpers
  rmr-clt.h	client-side structs and function declarations
  rmr-srv.h	server-side structs and function declarations,
		including the IO store interface (struct
		rmr_srv_store_ops) implemented by an upper-layer
		consumer

No code is compiled by this patch on its own; the modules are
wired into the build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the three source files that provide functionality shared by both
the RMR client and the RMR server:

  rmr-pool.c	pool refcounting, lookup and lifecycle helpers used
		by both client and server pool implementations.
  rmr-map.c	dirty-map data structure used to track which blocks
		have not yet been replicated to a given pool member.
  rmr-req.c	server-side request infrastructure that submits an
		I/O to an upper-layer store via struct
		rmr_srv_store_ops and propagates the completion back
		into RMR.

These files are not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the RMR client implementation:

  rmr-clt.c		client core: session and pool-session state
			machine, RTRS transport setup, IO submission
			and completion paths, command messaging.
  rmr-map-mgmt.c	client-side dirty-map management: spreading
			updates to pool members, handling map check
			responses and resync coordination.
  rmr-clt-stats.c	client per-pool statistics counters.
  rmr-clt-trace.c	tracepoint definitions for client state
  rmr-clt-trace.h	transitions and IO submission events.

The trace points are referenced from rmr-clt.c and
rmr-map-mgmt.c, so they are added together with the client core.

These files are not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the client-side sysfs interface used to administer RMR pools
and sessions: creating/removing pools, joining and leaving pool
sessions, and exposing per-pool and per-session attributes.

The sysfs hierarchy lives under /sys/devices/virtual/rmr-client/
and is the primary administrative interface for the RMR client.

This file is not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the RMR server implementation:

  rmr-srv.c	server core: session handling, pool registration via
		rmr_srv_register(), incoming command and IO message
		processing, sync thread coordination and the
		rmr_srv_query()/rmr_srv_unregister() entry points used
		by upper-layer stores.
  rmr-srv-md.c	server-side metadata persistence: serialising the
		pool metadata (member ID, map version, mapped size,
		store state) and the dirty maps to the underlying
		store, plus the periodic md_sync delayed work.

The server interacts with an upper-layer store via the
struct rmr_srv_store_ops interface defined in rmr-srv.h, allowing
different store implementations (block device, file, ...) to plug
in without modifying RMR itself.

These files are not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the server-side sysfs interface used to administer RMR server
pools and sessions, mirroring the client sysfs layout.  Exposes
attributes for member ID, store state, map state and sync status,
and accepts administrative commands such as joining and leaving
pool members.

The sysfs hierarchy lives under /sys/devices/virtual/rmr-server/.

This file is not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the per-directory Kconfig and Makefile, and wire them into the
parent drivers/infiniband Kconfig and drivers/infiniband/ulp Makefile
so RMR can be enabled in a kernel build.

Three Kconfig symbols are introduced:

  CONFIG_INFINIBAND_RMR		(silent, selected by either side)
  CONFIG_INFINIBAND_RMR_CLIENT	(depends on INFINIBAND_RTRS_CLIENT)
  CONFIG_INFINIBAND_RMR_SERVER	(depends on INFINIBAND_RTRS_SERVER)

The Makefile builds two modules: rmr-client.ko and rmr-server.ko,
sharing the pool, map, request and library code added earlier in
this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Block device over RMR (BRMR) is an upper-layer block driver that
sits on top of the RMR ULP and exposes a standard Linux block device
(/dev/brmrX) backed by an RMR pool.

Add the BRMR private headers:

  brmr-proto.h	wire-protocol structs exchanged between client and
		server outside of the rmr-clt/rmr-srv command channel.
  brmr-clt.h	client-side data structures: per-pool tag set, per-CPU
		requeue queues, per-device statistics and gendisk state.
  brmr-srv.h	server-side data structures: brmr_srv_blk_dev backing
		store description, on-disk metadata header layout and
		state-bit helpers.

These files are not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the BRMR client implementation:

  brmr-clt.c		client core: gendisk and tag-set creation per
			pool, blk-mq queue_rq() submitting block IOs to
			the underlying RMR pool, queue limit setup
			(chunk size, write-zeroes, discard, write-cache
			and FUA features) and device tear-down.
  brmr-clt-reque.c	per-CPU requeue queues used to retry IOs
			temporarily blocked on RMR resource exhaustion.
  brmr-clt-stats.c	per-pool statistics counters (request size
			distribution, BLK_STS_RESOURCE returns).

These files are not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the BRMR client sysfs interface used to map and unmap remote
devices.  Writes to /sys/devices/virtual/brmr-client/ctl/map_device
trigger creation of a /dev/brmrN gendisk backed by the named RMR
pool; per-device attribute groups expose the device state and
statistics, and accept unmap requests.

This file is not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the BRMR server implementation that exports a local block device
as the backing store for an RMR pool.

brmr-srv.c implements the struct rmr_srv_store_ops interface
provided by RMR (rmr-srv.h) and registers each backing device with
rmr_srv_register().  The submit_req and submit_md_req callbacks
issue bios to the underlying block_device, propagating the
completion back to RMR via rmr_srv_endreq().  The on-disk metadata
header at the end of the device is validated on bring-up and used
to detect re-mapping into an existing pool.

This file is not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the BRMR server sysfs interface used to register and unregister
backing block devices.  Writes to
/sys/devices/virtual/brmr-server/ctl/map_device open the named
block device, validate or initialise its on-disk metadata, and
register it with RMR as the IO store for the named pool.

This file is not compiled until the modules are wired into the
build in a later patch in this series.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
Add the per-directory Kconfig and Makefile, and wire them into the
parent drivers/block Kconfig and Makefile so BRMR can be enabled in
a kernel build.

Three Kconfig symbols are introduced:

  CONFIG_BLK_DEV_BRMR		(silent, selected by either side)
  CONFIG_BLK_DEV_BRMR_CLIENT	(depends on INFINIBAND_RMR_CLIENT)
  CONFIG_BLK_DEV_BRMR_SERVER	(depends on INFINIBAND_RMR_SERVER)

The Makefile builds two modules: brmr-client.ko and brmr-server.ko.
The server side acts as a consumer of the RMR server-side IO store
interface (struct rmr_srv_store_ops) to back an RMR pool with a
local block device.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jia Li <jia.li@ionos.com>
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 5, 2026

Upstream branch: 6d35786
series: https://patchwork.kernel.org/project/linux-block/list/?series=1089693
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1089693=>linus-master branch from f16a0de to fec55e5 Compare May 5, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant