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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php