RDMA/rmr: add public and private headers#797
Open
blktests-ci[bot] wants to merge 13 commits intolinus-master_basefrom
Open
RDMA/rmr: add public and private headers#797blktests-ci[bot] wants to merge 13 commits intolinus-master_basefrom
blktests-ci[bot] wants to merge 13 commits intolinus-master_basefrom
Conversation
Author
|
Upstream branch: 6d35786 |
6f75bd1 to
1f0d33a
Compare
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>
Author
|
Upstream branch: 6d35786 |
f16a0de to
fec55e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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