#include <linux/atomic.h>
#include <linux/types.h>
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/rcupdate.h>
#include <linux/rculist.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/sunrpc/xprt.h>
#include <linux/sunrpc/addr.h>
#include <linux/sunrpc/xprtmultipath.h>
#include "sysfs.h"
xprt_switch_find_xprt_t;
static const struct rpc_xprt_iter_ops rpc_xprt_iter_singular;
static const struct rpc_xprt_iter_ops rpc_xprt_iter_roundrobin;
static const struct rpc_xprt_iter_ops rpc_xprt_iter_listall;
static const struct rpc_xprt_iter_ops rpc_xprt_iter_listoffline;
static void xprt_switch_add_xprt_locked(struct rpc_xprt_switch *xps,
struct rpc_xprt *xprt)
{ … }
void rpc_xprt_switch_add_xprt(struct rpc_xprt_switch *xps,
struct rpc_xprt *xprt)
{ … }
static void xprt_switch_remove_xprt_locked(struct rpc_xprt_switch *xps,
struct rpc_xprt *xprt, bool offline)
{ … }
void rpc_xprt_switch_remove_xprt(struct rpc_xprt_switch *xps,
struct rpc_xprt *xprt, bool offline)
{ … }
static DEFINE_IDA(rpc_xprtswitch_ids);
void xprt_multipath_cleanup_ids(void)
{ … }
static int xprt_switch_alloc_id(struct rpc_xprt_switch *xps, gfp_t gfp_flags)
{ … }
static void xprt_switch_free_id(struct rpc_xprt_switch *xps)
{ … }
struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt,
gfp_t gfp_flags)
{ … }
static void xprt_switch_free_entries(struct rpc_xprt_switch *xps)
{ … }
static void xprt_switch_free(struct kref *kref)
{ … }
struct rpc_xprt_switch *xprt_switch_get(struct rpc_xprt_switch *xps)
{ … }
void xprt_switch_put(struct rpc_xprt_switch *xps)
{ … }
void rpc_xprt_switch_set_roundrobin(struct rpc_xprt_switch *xps)
{ … }
static
const struct rpc_xprt_iter_ops *xprt_iter_ops(const struct rpc_xprt_iter *xpi)
{ … }
static
void xprt_iter_no_rewind(struct rpc_xprt_iter *xpi)
{ … }
static
void xprt_iter_default_rewind(struct rpc_xprt_iter *xpi)
{ … }
static
bool xprt_is_active(const struct rpc_xprt *xprt)
{ … }
static
struct rpc_xprt *xprt_switch_find_first_entry(struct list_head *head)
{ … }
static
struct rpc_xprt *xprt_switch_find_first_entry_offline(struct list_head *head)
{ … }
static
struct rpc_xprt *xprt_iter_first_entry(struct rpc_xprt_iter *xpi)
{ … }
static
struct rpc_xprt *_xprt_switch_find_current_entry(struct list_head *head,
const struct rpc_xprt *cur,
bool find_active)
{ … }
static
struct rpc_xprt *xprt_switch_find_current_entry(struct list_head *head,
const struct rpc_xprt *cur)
{ … }
static
struct rpc_xprt * _xprt_iter_current_entry(struct rpc_xprt_iter *xpi,
struct rpc_xprt *first_entry(struct list_head *head),
struct rpc_xprt *current_entry(struct list_head *head,
const struct rpc_xprt *cur))
{ … }
static
struct rpc_xprt *xprt_iter_current_entry(struct rpc_xprt_iter *xpi)
{ … }
static
struct rpc_xprt *xprt_switch_find_current_entry_offline(struct list_head *head,
const struct rpc_xprt *cur)
{ … }
static
struct rpc_xprt *xprt_iter_current_entry_offline(struct rpc_xprt_iter *xpi)
{ … }
static
bool __rpc_xprt_switch_has_addr(struct rpc_xprt_switch *xps,
const struct sockaddr *sap)
{ … }
bool rpc_xprt_switch_has_addr(struct rpc_xprt_switch *xps,
const struct sockaddr *sap)
{ … }
static
struct rpc_xprt *xprt_switch_find_next_entry(struct list_head *head,
const struct rpc_xprt *cur, bool check_active)
{ … }
static
struct rpc_xprt *xprt_switch_set_next_cursor(struct rpc_xprt_switch *xps,
struct rpc_xprt **cursor,
xprt_switch_find_xprt_t find_next)
{ … }
static
struct rpc_xprt *xprt_iter_next_entry_multiple(struct rpc_xprt_iter *xpi,
xprt_switch_find_xprt_t find_next)
{ … }
static
struct rpc_xprt *__xprt_switch_find_next_entry_roundrobin(struct list_head *head,
const struct rpc_xprt *cur)
{ … }
static
struct rpc_xprt *xprt_switch_find_next_entry_roundrobin(struct rpc_xprt_switch *xps,
const struct rpc_xprt *cur)
{ … }
static
struct rpc_xprt *xprt_iter_next_entry_roundrobin(struct rpc_xprt_iter *xpi)
{ … }
static
struct rpc_xprt *xprt_switch_find_next_entry_all(struct rpc_xprt_switch *xps,
const struct rpc_xprt *cur)
{ … }
static
struct rpc_xprt *xprt_switch_find_next_entry_offline(struct rpc_xprt_switch *xps,
const struct rpc_xprt *cur)
{ … }
static
struct rpc_xprt *xprt_iter_next_entry_all(struct rpc_xprt_iter *xpi)
{ … }
static
struct rpc_xprt *xprt_iter_next_entry_offline(struct rpc_xprt_iter *xpi)
{ … }
void xprt_iter_rewind(struct rpc_xprt_iter *xpi)
{ … }
static void __xprt_iter_init(struct rpc_xprt_iter *xpi,
struct rpc_xprt_switch *xps,
const struct rpc_xprt_iter_ops *ops)
{ … }
void xprt_iter_init(struct rpc_xprt_iter *xpi,
struct rpc_xprt_switch *xps)
{ … }
void xprt_iter_init_listall(struct rpc_xprt_iter *xpi,
struct rpc_xprt_switch *xps)
{ … }
void xprt_iter_init_listoffline(struct rpc_xprt_iter *xpi,
struct rpc_xprt_switch *xps)
{ … }
struct rpc_xprt_switch *xprt_iter_xchg_switch(struct rpc_xprt_iter *xpi,
struct rpc_xprt_switch *newswitch)
{ … }
void xprt_iter_destroy(struct rpc_xprt_iter *xpi)
{ … }
struct rpc_xprt *xprt_iter_xprt(struct rpc_xprt_iter *xpi)
{ … }
static
struct rpc_xprt *xprt_iter_get_helper(struct rpc_xprt_iter *xpi,
struct rpc_xprt *(*fn)(struct rpc_xprt_iter *))
{ … }
struct rpc_xprt *xprt_iter_get_xprt(struct rpc_xprt_iter *xpi)
{ … }
struct rpc_xprt *xprt_iter_get_next(struct rpc_xprt_iter *xpi)
{ … }
static
const struct rpc_xprt_iter_ops rpc_xprt_iter_singular = …;
static
const struct rpc_xprt_iter_ops rpc_xprt_iter_roundrobin = …;
static
const struct rpc_xprt_iter_ops rpc_xprt_iter_listall = …;
static
const struct rpc_xprt_iter_ops rpc_xprt_iter_listoffline = …;