~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/sunrpc/xprtmultipath.h

Version: ~ [ linux-5.15-rc5 ] ~ [ linux-5.14.11 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.72 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.152 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.210 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.250 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.286 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.288 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * RPC client multipathing definitions
  3  *
  4  * Copyright (c) 2015, 2016, Primary Data, Inc. All rights reserved.
  5  *
  6  * Trond Myklebust <trond.myklebust@primarydata.com>
  7  */
  8 #ifndef _NET_SUNRPC_XPRTMULTIPATH_H
  9 #define _NET_SUNRPC_XPRTMULTIPATH_H
 10 
 11 struct rpc_xprt_iter_ops;
 12 struct rpc_xprt_switch {
 13         spinlock_t              xps_lock;
 14         struct kref             xps_kref;
 15 
 16         unsigned int            xps_nxprts;
 17         struct list_head        xps_xprt_list;
 18 
 19         struct net *            xps_net;
 20 
 21         const struct rpc_xprt_iter_ops *xps_iter_ops;
 22 
 23         struct rcu_head         xps_rcu;
 24 };
 25 
 26 struct rpc_xprt_iter {
 27         struct rpc_xprt_switch __rcu *xpi_xpswitch;
 28         struct rpc_xprt *       xpi_cursor;
 29 
 30         const struct rpc_xprt_iter_ops *xpi_ops;
 31 };
 32 
 33 
 34 struct rpc_xprt_iter_ops {
 35         void (*xpi_rewind)(struct rpc_xprt_iter *);
 36         struct rpc_xprt *(*xpi_xprt)(struct rpc_xprt_iter *);
 37         struct rpc_xprt *(*xpi_next)(struct rpc_xprt_iter *);
 38 };
 39 
 40 extern struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt,
 41                 gfp_t gfp_flags);
 42 
 43 extern struct rpc_xprt_switch *xprt_switch_get(struct rpc_xprt_switch *xps);
 44 extern void xprt_switch_put(struct rpc_xprt_switch *xps);
 45 
 46 extern void rpc_xprt_switch_set_roundrobin(struct rpc_xprt_switch *xps);
 47 
 48 extern void rpc_xprt_switch_add_xprt(struct rpc_xprt_switch *xps,
 49                 struct rpc_xprt *xprt);
 50 extern void rpc_xprt_switch_remove_xprt(struct rpc_xprt_switch *xps,
 51                 struct rpc_xprt *xprt);
 52 
 53 extern void xprt_iter_init(struct rpc_xprt_iter *xpi,
 54                 struct rpc_xprt_switch *xps);
 55 
 56 extern void xprt_iter_init_listall(struct rpc_xprt_iter *xpi,
 57                 struct rpc_xprt_switch *xps);
 58 
 59 extern void xprt_iter_destroy(struct rpc_xprt_iter *xpi);
 60 
 61 extern struct rpc_xprt_switch *xprt_iter_xchg_switch(
 62                 struct rpc_xprt_iter *xpi,
 63                 struct rpc_xprt_switch *newswitch);
 64 
 65 extern struct rpc_xprt *xprt_iter_xprt(struct rpc_xprt_iter *xpi);
 66 extern struct rpc_xprt *xprt_iter_get_xprt(struct rpc_xprt_iter *xpi);
 67 extern struct rpc_xprt *xprt_iter_get_next(struct rpc_xprt_iter *xpi);
 68 
 69 extern bool rpc_xprt_switch_has_addr(struct rpc_xprt_switch *xps,
 70                 const struct sockaddr *sap);
 71 #endif
 72 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp