Merge branch 'sysfs-devel'
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
commit
526fca3764
12 changed files with 650 additions and 2 deletions
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/sunrpc/xprtmultipath.h>
|
||||
|
||||
struct rpc_inode;
|
||||
struct rpc_sysfs_client;
|
||||
|
||||
/*
|
||||
* The high-level client handle
|
||||
|
|
@ -71,6 +72,7 @@ struct rpc_clnt {
|
|||
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
|
||||
struct dentry *cl_debugfs; /* debugfs directory */
|
||||
#endif
|
||||
struct rpc_sysfs_client *cl_sysfs; /* sysfs directory */
|
||||
/* cl_work is only needed after cl_xpi is no longer used,
|
||||
* and that are of similar size
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ enum rpc_display_format_t {
|
|||
|
||||
struct rpc_task;
|
||||
struct rpc_xprt;
|
||||
struct xprt_class;
|
||||
struct seq_file;
|
||||
struct svc_serv;
|
||||
struct net;
|
||||
|
|
@ -182,9 +183,11 @@ 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 */
|
||||
unsigned int id; /* transport id */
|
||||
|
||||
const struct rpc_timeout *timeout; /* timeout parms */
|
||||
struct sockaddr_storage addr; /* server address */
|
||||
|
|
@ -288,6 +291,8 @@ struct rpc_xprt {
|
|||
atomic_t inject_disconnect;
|
||||
#endif
|
||||
struct rcu_head rcu;
|
||||
const struct xprt_class *xprt_class;
|
||||
struct rpc_sysfs_xprt *xprt_sysfs;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
|
|
@ -370,6 +375,7 @@ struct rpc_xprt * xprt_alloc(struct net *net, size_t size,
|
|||
void xprt_free(struct rpc_xprt *);
|
||||
void xprt_add_backlog(struct rpc_xprt *xprt, struct rpc_task *task);
|
||||
bool xprt_wake_up_backlog(struct rpc_xprt *xprt, struct rpc_rqst *req);
|
||||
void xprt_cleanup_ids(void);
|
||||
|
||||
static inline int
|
||||
xprt_enable_swap(struct rpc_xprt *xprt)
|
||||
|
|
@ -408,6 +414,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie);
|
|||
|
||||
bool xprt_lock_connect(struct rpc_xprt *, struct rpc_task *, void *);
|
||||
void xprt_unlock_connect(struct rpc_xprt *, void *);
|
||||
void xprt_release_write(struct rpc_xprt *, struct rpc_task *);
|
||||
|
||||
/*
|
||||
* Reserved bit positions in xprt->state
|
||||
|
|
|
|||
|
|
@ -10,10 +10,12 @@
|
|||
#define _NET_SUNRPC_XPRTMULTIPATH_H
|
||||
|
||||
struct rpc_xprt_iter_ops;
|
||||
struct rpc_sysfs_xprt_switch;
|
||||
struct rpc_xprt_switch {
|
||||
spinlock_t xps_lock;
|
||||
struct kref xps_kref;
|
||||
|
||||
unsigned int xps_id;
|
||||
unsigned int xps_nxprts;
|
||||
unsigned int xps_nactive;
|
||||
atomic_long_t xps_queuelen;
|
||||
|
|
@ -23,6 +25,7 @@ struct rpc_xprt_switch {
|
|||
|
||||
const struct rpc_xprt_iter_ops *xps_iter_ops;
|
||||
|
||||
struct rpc_sysfs_xprt_switch *xps_sysfs;
|
||||
struct rcu_head xps_rcu;
|
||||
};
|
||||
|
||||
|
|
@ -71,4 +74,7 @@ extern struct rpc_xprt *xprt_iter_get_next(struct rpc_xprt_iter *xpi);
|
|||
|
||||
extern bool rpc_xprt_switch_has_addr(struct rpc_xprt_switch *xps,
|
||||
const struct sockaddr *sap);
|
||||
|
||||
extern void xprt_multipath_cleanup_ids(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue