Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/rtrs-server

FieldValue
SubsystemRTRS-server (RDMA Transport, server side; transport used by RNBD); implementation file not in cached tree
Config gatenot verifiable from cached tree (no drivers/Kconfig cached)
ABI documentationDocumentation/ABI/testing/sysfs-class-rtrs-server (7 What: entries)
Since5.7 (Feb 2020, all entries)
Live (5.10.134 host)class absent: /sys/class/rtrs-server does not exist in this container
Ledger IDSYSC-rtrs-server

What it represents

The mirror of rtrs-client on the exporting host: “When a user of RTRS API creates a new session on a client side, a directory entry with the name of that session is created in here” (ABI). Each session exposes its paths as src@dst directories with read-only identity/state files, RDMA statistics, and one write-only control file, disconnect. There is no add_path here: paths are created by the client writing its own add_path, and the server side directory appears as a result.

Relationship to the device model

The paths/ tree is created lazily: “When new path is created by writing to ‘add_path’ entry on client side, a directory entry named as @<destination address> is created on server.” hca_name and hca_port again tie paths to RDMA hardware (infiniband); the block consumer on this side is rnbd-server.

Attributes

AttributeR/WUnit/formatConditional?Source
<session-name>/paths/ROone src@dst directory per path the client addedper sessionABI testing sysfs-class-rtrs-server, 5.7
paths/src@dst/disconnectWOwrite “1” to disconnect the RTRS session; non-blocking, returns immediatelyper pathABI, 5.7
paths/src@dst/hca_nameROname of the HCA the connection established onper pathABI, 5.7
paths/src@dst/hca_portROport number of the active portper pathABI, 5.7
paths/src@dst/src_addrROsource address of the pathper pathABI, 5.7
paths/src@dst/dst_addrROdestination address of the pathper pathABI, 5.7
paths/src@dst/stats/rdmaROfive values: read-count read-total-size write-count write-total-size inflightsper pathABI, 5.7

Compared to the client, the server stats/ tree is smaller: no cpu_migration, reconnects, reset_all, or cur_latency entries appear in the server ABI file.

Safety and writes

Reads are safe. The single write, disconnect, tears down an RTRS path on the server side; the ABI notes it is non-blocking and “returns control immediately to the caller”, so completion must be observed elsewhere (e.g. the directory disappearing). The class is absent on the 5.10.134 host; no live read or write was possible.

References

  • Documentation/ABI/testing/sysfs-class-rtrs-server (cached copy)
  • https://github.com/torvalds/linux/blob/master/Documentation/ABI/testing/sysfs-class-rtrs-server
  • sysfs-attrs.json entry rtrs-server (7 paths); live enumeration: class absent, kernel 5.10.134
  • Related pages: rtrs-client, rnbd-server, infiniband; coverage: ledger