Lines Matching refs:rpc_xprt_switch
24 typedef struct rpc_xprt *(*xprt_switch_find_xprt_t)(struct rpc_xprt_switch *xps,
32 static void xprt_switch_add_xprt_locked(struct rpc_xprt_switch *xps,
46 * rpc_xprt_switch_add_xprt - Add a new rpc_xprt to an rpc_xprt_switch
47 * @xps: pointer to struct rpc_xprt_switch
52 void rpc_xprt_switch_add_xprt(struct rpc_xprt_switch *xps,
64 static void xprt_switch_remove_xprt_locked(struct rpc_xprt_switch *xps,
79 * rpc_xprt_switch_remove_xprt - Removes an rpc_xprt from a rpc_xprt_switch
80 * @xps: pointer to struct rpc_xprt_switch
86 void rpc_xprt_switch_remove_xprt(struct rpc_xprt_switch *xps,
102 static int xprt_switch_alloc_id(struct rpc_xprt_switch *xps, gfp_t gfp_flags)
114 static void xprt_switch_free_id(struct rpc_xprt_switch *xps)
120 * xprt_switch_alloc - Allocate a new struct rpc_xprt_switch
124 * On success, returns an initialised struct rpc_xprt_switch, containing
127 struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt,
130 struct rpc_xprt_switch *xps;
151 static void xprt_switch_free_entries(struct rpc_xprt_switch *xps)
169 struct rpc_xprt_switch *xps = container_of(kref,
170 struct rpc_xprt_switch, xps_kref);
179 * xprt_switch_get - Return a reference to a rpc_xprt_switch
180 * @xps: pointer to struct rpc_xprt_switch
184 struct rpc_xprt_switch *xprt_switch_get(struct rpc_xprt_switch *xps)
192 * xprt_switch_put - Release a reference to a rpc_xprt_switch
193 * @xps: pointer to struct rpc_xprt_switch
197 void xprt_switch_put(struct rpc_xprt_switch *xps)
204 * rpc_xprt_switch_set_roundrobin - Set a round-robin policy on rpc_xprt_switch
205 * @xps: pointer to struct rpc_xprt_switch
209 void rpc_xprt_switch_set_roundrobin(struct rpc_xprt_switch *xps)
268 struct rpc_xprt_switch *xps = rcu_dereference(xpi->xpi_xpswitch);
306 struct rpc_xprt_switch *xps = rcu_dereference(xpi->xpi_xpswitch);
340 bool __rpc_xprt_switch_has_addr(struct rpc_xprt_switch *xps,
360 bool rpc_xprt_switch_has_addr(struct rpc_xprt_switch *xps,
395 struct rpc_xprt *xprt_switch_set_next_cursor(struct rpc_xprt_switch *xps,
411 struct rpc_xprt_switch *xps = rcu_dereference(xpi->xpi_xpswitch);
431 struct rpc_xprt *xprt_switch_find_next_entry_roundrobin(struct rpc_xprt_switch *xps,
463 struct rpc_xprt *xprt_switch_find_next_entry_all(struct rpc_xprt_switch *xps,
470 struct rpc_xprt *xprt_switch_find_next_entry_offline(struct rpc_xprt_switch *xps,
505 struct rpc_xprt_switch *xps,
516 * @xps: pointer to rpc_xprt_switch
523 struct rpc_xprt_switch *xps)
531 * @xps: pointer to rpc_xprt_switch
537 struct rpc_xprt_switch *xps)
543 struct rpc_xprt_switch *xps)
549 * xprt_iter_xchg_switch - Atomically swap out the rpc_xprt_switch
551 * @newswitch: pointer to a new rpc_xprt_switch or NULL
555 struct rpc_xprt_switch *xprt_iter_xchg_switch(struct rpc_xprt_iter *xpi,
556 struct rpc_xprt_switch *newswitch)
558 struct rpc_xprt_switch __rcu *oldswitch;
639 /* Policy for always returning the first entry in the rpc_xprt_switch */
647 /* Policy for round-robin iteration of entries in the rpc_xprt_switch */
655 /* Policy for once-through iteration of entries in the rpc_xprt_switch */