sunrpc: add add sysfs directory per xprt under each xprt_switch

Add individual transport directories under each transport switch
group. For instance, for each nconnect=X connections there will be
a transport directory. Naming conventions also identifies transport
type -- xprt-<id>-<type> where type is udp, tcp, rdma, local, bc.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
Olga Kornievskaia 2021-06-08 15:59:18 -04:00 committed by Trond Myklebust
parent 2a338a5431
commit d408ebe04a
4 changed files with 81 additions and 0 deletions

View file

@ -183,6 +183,7 @@ enum xprt_transports {
XPRT_TRANSPORT_LOCAL = 257,
};
struct rpc_sysfs_xprt;
struct rpc_xprt {
struct kref kref; /* Reference count */
const struct rpc_xprt_ops *ops; /* transport methods */
@ -291,6 +292,7 @@ struct rpc_xprt {
#endif
struct rcu_head rcu;
const struct xprt_class *xprt_class;
struct rpc_sysfs_xprt *xprt_sysfs;
};
#if defined(CONFIG_SUNRPC_BACKCHANNEL)