/* SPDX-License-Identifier: GPL-2.0 */ /* * RPC client multipathing definitions * * Copyright (c) 2015, 2016, Primary Data, Inc. All rights reserved. * * Trond Myklebust <trond.myklebust@primarydata.com> */ #ifndef _NET_SUNRPC_XPRTMULTIPATH_H #define _NET_SUNRPC_XPRTMULTIPATH_H struct rpc_xprt_iter_ops; struct rpc_xprt_switch { spinlock_t xps_lock; struct kref xps_kref; unsigned int xps_nxprts; struct list_head xps_xprt_list; struct net * xps_net; const struct rpc_xprt_iter_ops *xps_iter_ops; struct rcu_head xps_rcu; }; struct rpc_xprt_iter { struct rpc_xprt_switch __rcu *xpi_xpswitch; struct rpc_xprt * xpi_cursor; const struct rpc_xprt_iter_ops *xpi_ops; }; struct rpc_xprt_iter_ops { void (*xpi_rewind)(struct rpc_xprt_iter *); struct rpc_xprt *(*xpi_xprt)(struct rpc_xprt_iter *); struct rpc_xprt *(*xpi_next)(struct rpc_xprt_iter *); }; extern struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt, gfp_t gfp_flags); extern struct rpc_xprt_switch *xprt_switch_get(struct rpc_xprt_switch *xps); extern void xprt_switch_put(struct rpc_xprt_switch *xps); extern void rpc_xprt_switch_set_roundrobin(struct rpc_xprt_switch *xps); extern void rpc_xprt_switch_add_xprt(struct rpc_xprt_switch *xps, struct rpc_xprt *xprt); extern void rpc_xprt_switch_remove_xprt(struct rpc_xprt_switch *xps, struct rpc_xprt *xprt); extern void xprt_iter_init(struct rpc_xprt_iter *xpi, struct rpc_xprt_switch *xps); extern void xprt_iter_init_listall(struct rpc_xprt_iter *xpi, struct rpc_xprt_switch *xps); extern void xprt_iter_destroy(struct rpc_xprt_iter *xpi); extern struct rpc_xprt_switch *xprt_iter_xchg_switch( struct rpc_xprt_iter *xpi, struct rpc_xprt_switch *newswitch); extern struct rpc_xprt *xprt_iter_xprt(struct rpc_xprt_iter *xpi); extern struct rpc_xprt *xprt_iter_get_xprt(struct rpc_xprt_iter *xpi); 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); #endif
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
addr.h | File | 4.94 KB | 0644 |
|
auth.h | File | 7.43 KB | 0644 |
|
auth_gss.h | File | 2.33 KB | 0644 |
|
bc_xprt.h | File | 2.42 KB | 0644 |
|
cache.h | File | 8.38 KB | 0644 |
|
clnt.h | File | 7.17 KB | 0644 |
|
debug.h | File | 2.76 KB | 0644 |
|
gss_api.h | File | 4.56 KB | 0644 |
|
gss_asn1.h | File | 3.11 KB | 0644 |
|
gss_err.h | File | 5.93 KB | 0644 |
|
gss_krb5.h | File | 11.15 KB | 0644 |
|
gss_krb5_enctypes.h | File | 123 B | 0644 |
|
metrics.h | File | 3.52 KB | 0644 |
|
msg_prot.h | File | 6.23 KB | 0644 |
|
rpc_pipe_fs.h | File | 3.92 KB | 0644 |
|
rpc_rdma.h | File | 3.81 KB | 0644 |
|
sched.h | File | 9.09 KB | 0644 |
|
stats.h | File | 2.01 KB | 0644 |
|
svc.h | File | 16.55 KB | 0644 |
|
svc_rdma.h | File | 7.43 KB | 0644 |
|
svc_xprt.h | File | 6.63 KB | 0644 |
|
svcauth.h | File | 6.11 KB | 0644 |
|
svcauth_gss.h | File | 824 B | 0644 |
|
svcsock.h | File | 2.06 KB | 0644 |
|
timer.h | File | 1.14 KB | 0644 |
|
types.h | File | 497 B | 0644 |
|
xdr.h | File | 12.73 KB | 0644 |
|
xprt.h | File | 14.77 KB | 0644 |
|
xprtmultipath.h | File | 2 KB | 0644 |
|
xprtrdma.h | File | 2.9 KB | 0644 |
|
xprtsock.h | File | 1.73 KB | 0644 |
|