Lines Matching refs:clnt

81 static int	rpc_ping(struct rpc_clnt *clnt);
83 static void rpc_register_client(struct rpc_clnt *clnt) in rpc_register_client() argument
85 struct net *net = rpc_net_ns(clnt); in rpc_register_client()
89 list_add(&clnt->cl_clients, &sn->all_clients); in rpc_register_client()
93 static void rpc_unregister_client(struct rpc_clnt *clnt) in rpc_unregister_client() argument
95 struct net *net = rpc_net_ns(clnt); in rpc_unregister_client()
99 list_del(&clnt->cl_clients); in rpc_unregister_client()
103 static void __rpc_clnt_remove_pipedir(struct rpc_clnt *clnt) in __rpc_clnt_remove_pipedir() argument
105 rpc_remove_client_dir(clnt); in __rpc_clnt_remove_pipedir()
108 static void rpc_clnt_remove_pipedir(struct rpc_clnt *clnt) in rpc_clnt_remove_pipedir() argument
110 struct net *net = rpc_net_ns(clnt); in rpc_clnt_remove_pipedir()
115 __rpc_clnt_remove_pipedir(clnt); in rpc_clnt_remove_pipedir()
121 struct rpc_clnt *clnt) in rpc_setup_pipedir_sb() argument
124 const char *dir_name = clnt->cl_program->pipe_dir_name; in rpc_setup_pipedir_sb()
136 dentry = rpc_create_client_dir(dir, name, clnt); in rpc_setup_pipedir_sb()
151 rpc_setup_pipedir(struct super_block *pipefs_sb, struct rpc_clnt *clnt) in rpc_setup_pipedir() argument
155 if (clnt->cl_program->pipe_dir_name != NULL) { in rpc_setup_pipedir()
156 dentry = rpc_setup_pipedir_sb(pipefs_sb, clnt); in rpc_setup_pipedir()
163 static int rpc_clnt_skip_event(struct rpc_clnt *clnt, unsigned long event) in rpc_clnt_skip_event() argument
165 if (clnt->cl_program->pipe_dir_name == NULL) in rpc_clnt_skip_event()
170 if (clnt->cl_pipedir_objects.pdh_dentry != NULL) in rpc_clnt_skip_event()
172 if (atomic_read(&clnt->cl_count) == 0) in rpc_clnt_skip_event()
176 if (clnt->cl_pipedir_objects.pdh_dentry == NULL) in rpc_clnt_skip_event()
183 static int __rpc_clnt_handle_event(struct rpc_clnt *clnt, unsigned long event, in __rpc_clnt_handle_event() argument
190 dentry = rpc_setup_pipedir_sb(sb, clnt); in __rpc_clnt_handle_event()
197 __rpc_clnt_remove_pipedir(clnt); in __rpc_clnt_handle_event()
206 static int __rpc_pipefs_event(struct rpc_clnt *clnt, unsigned long event, in __rpc_pipefs_event() argument
211 for (;; clnt = clnt->cl_parent) { in __rpc_pipefs_event()
212 if (!rpc_clnt_skip_event(clnt, event)) in __rpc_pipefs_event()
213 error = __rpc_clnt_handle_event(clnt, event, sb); in __rpc_pipefs_event()
214 if (error || clnt == clnt->cl_parent) in __rpc_pipefs_event()
223 struct rpc_clnt *clnt; in rpc_get_client_for_event() local
226 list_for_each_entry(clnt, &sn->all_clients, cl_clients) { in rpc_get_client_for_event()
227 if (rpc_clnt_skip_event(clnt, event)) in rpc_get_client_for_event()
230 return clnt; in rpc_get_client_for_event()
240 struct rpc_clnt *clnt; in rpc_pipefs_event() local
243 while ((clnt = rpc_get_client_for_event(sb->s_fs_info, event))) { in rpc_pipefs_event()
244 error = __rpc_pipefs_event(clnt, event, sb); in rpc_pipefs_event()
266 static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt, in rpc_clnt_set_transport() argument
272 spin_lock(&clnt->cl_lock); in rpc_clnt_set_transport()
273 old = rcu_dereference_protected(clnt->cl_xprt, in rpc_clnt_set_transport()
274 lockdep_is_held(&clnt->cl_lock)); in rpc_clnt_set_transport()
277 clnt->cl_autobind = 1; in rpc_clnt_set_transport()
279 clnt->cl_timeout = timeout; in rpc_clnt_set_transport()
280 rcu_assign_pointer(clnt->cl_xprt, xprt); in rpc_clnt_set_transport()
281 spin_unlock(&clnt->cl_lock); in rpc_clnt_set_transport()
286 static void rpc_clnt_set_nodename(struct rpc_clnt *clnt, const char *nodename) in rpc_clnt_set_nodename() argument
288 clnt->cl_nodelen = strlcpy(clnt->cl_nodename, in rpc_clnt_set_nodename()
289 nodename, sizeof(clnt->cl_nodename)); in rpc_clnt_set_nodename()
292 static int rpc_client_register(struct rpc_clnt *clnt, in rpc_client_register() argument
301 struct net *net = rpc_net_ns(clnt); in rpc_client_register()
305 rpc_clnt_debugfs_register(clnt); in rpc_client_register()
309 err = rpc_setup_pipedir(pipefs_sb, clnt); in rpc_client_register()
314 rpc_register_client(clnt); in rpc_client_register()
318 auth = rpcauth_create(&auth_args, clnt); in rpc_client_register()
328 rpc_unregister_client(clnt); in rpc_client_register()
329 __rpc_clnt_remove_pipedir(clnt); in rpc_client_register()
333 rpc_clnt_debugfs_unregister(clnt); in rpc_client_register()
344 static int rpc_alloc_clid(struct rpc_clnt *clnt) in rpc_alloc_clid() argument
351 clnt->cl_clid = clid; in rpc_alloc_clid()
355 static void rpc_free_clid(struct rpc_clnt *clnt) in rpc_free_clid() argument
357 ida_simple_remove(&rpc_clids, clnt->cl_clid); in rpc_free_clid()
367 struct rpc_clnt *clnt = NULL; in rpc_new_client() local
388 clnt = kzalloc(sizeof(*clnt), GFP_KERNEL); in rpc_new_client()
389 if (!clnt) in rpc_new_client()
391 clnt->cl_parent = parent ? : clnt; in rpc_new_client()
393 err = rpc_alloc_clid(clnt); in rpc_new_client()
397 clnt->cl_procinfo = version->procs; in rpc_new_client()
398 clnt->cl_maxproc = version->nrprocs; in rpc_new_client()
399 clnt->cl_prog = args->prognumber ? : program->number; in rpc_new_client()
400 clnt->cl_vers = version->number; in rpc_new_client()
401 clnt->cl_stats = program->stats; in rpc_new_client()
402 clnt->cl_metrics = rpc_alloc_iostats(clnt); in rpc_new_client()
403 rpc_init_pipe_dir_head(&clnt->cl_pipedir_objects); in rpc_new_client()
405 if (clnt->cl_metrics == NULL) in rpc_new_client()
407 clnt->cl_program = program; in rpc_new_client()
408 INIT_LIST_HEAD(&clnt->cl_tasks); in rpc_new_client()
409 spin_lock_init(&clnt->cl_lock); in rpc_new_client()
413 memcpy(&clnt->cl_timeout_default, args->timeout, in rpc_new_client()
414 sizeof(clnt->cl_timeout_default)); in rpc_new_client()
415 timeout = &clnt->cl_timeout_default; in rpc_new_client()
418 rpc_clnt_set_transport(clnt, xprt, timeout); in rpc_new_client()
419 xprt_iter_init(&clnt->cl_xpi, xps); in rpc_new_client()
422 clnt->cl_rtt = &clnt->cl_rtt_default; in rpc_new_client()
423 rpc_init_rtt(&clnt->cl_rtt_default, clnt->cl_timeout->to_initval); in rpc_new_client()
425 atomic_set(&clnt->cl_count, 1); in rpc_new_client()
430 rpc_clnt_set_nodename(clnt, nodename); in rpc_new_client()
432 err = rpc_client_register(clnt, args->authflavor, args->client_name); in rpc_new_client()
437 return clnt; in rpc_new_client()
440 rpc_free_iostats(clnt->cl_metrics); in rpc_new_client()
442 rpc_free_clid(clnt); in rpc_new_client()
444 kfree(clnt); in rpc_new_client()
456 struct rpc_clnt *clnt = NULL; in rpc_create_xprt() local
474 clnt = rpc_new_client(args, xps, xprt, NULL); in rpc_create_xprt()
475 if (IS_ERR(clnt)) in rpc_create_xprt()
476 return clnt; in rpc_create_xprt()
479 int err = rpc_ping(clnt); in rpc_create_xprt()
481 rpc_shutdown_client(clnt); in rpc_create_xprt()
486 clnt->cl_softrtry = 1; in rpc_create_xprt()
488 clnt->cl_softrtry = 0; in rpc_create_xprt()
491 clnt->cl_autobind = 1; in rpc_create_xprt()
493 clnt->cl_noretranstimeo = 1; in rpc_create_xprt()
495 clnt->cl_discrtry = 1; in rpc_create_xprt()
497 clnt->cl_chatty = 1; in rpc_create_xprt()
499 return clnt; in rpc_create_xprt()
597 struct rpc_clnt *clnt) in __rpc_clone_client() argument
606 xprt = xprt_get(rcu_dereference(clnt->cl_xprt)); in __rpc_clone_client()
607 xps = xprt_switch_get(rcu_dereference(clnt->cl_xpi.xpi_xpswitch)); in __rpc_clone_client()
615 args->nodename = clnt->cl_nodename; in __rpc_clone_client()
617 new = rpc_new_client(args, xps, xprt, clnt); in __rpc_clone_client()
625 new->cl_softrtry = clnt->cl_softrtry; in __rpc_clone_client()
626 new->cl_noretranstimeo = clnt->cl_noretranstimeo; in __rpc_clone_client()
627 new->cl_discrtry = clnt->cl_discrtry; in __rpc_clone_client()
628 new->cl_chatty = clnt->cl_chatty; in __rpc_clone_client()
643 struct rpc_clnt *rpc_clone_client(struct rpc_clnt *clnt) in rpc_clone_client() argument
646 .program = clnt->cl_program, in rpc_clone_client()
647 .prognumber = clnt->cl_prog, in rpc_clone_client()
648 .version = clnt->cl_vers, in rpc_clone_client()
649 .authflavor = clnt->cl_auth->au_flavor, in rpc_clone_client()
651 return __rpc_clone_client(&args, clnt); in rpc_clone_client()
664 rpc_clone_client_set_auth(struct rpc_clnt *clnt, rpc_authflavor_t flavor) in rpc_clone_client_set_auth() argument
667 .program = clnt->cl_program, in rpc_clone_client_set_auth()
668 .prognumber = clnt->cl_prog, in rpc_clone_client_set_auth()
669 .version = clnt->cl_vers, in rpc_clone_client_set_auth()
672 return __rpc_clone_client(&args, clnt); in rpc_clone_client_set_auth()
691 int rpc_switch_client_transport(struct rpc_clnt *clnt, in rpc_switch_client_transport() argument
705 clnt); in rpc_switch_client_transport()
715 pseudoflavor = clnt->cl_auth->au_flavor; in rpc_switch_client_transport()
717 old_timeo = clnt->cl_timeout; in rpc_switch_client_transport()
718 old = rpc_clnt_set_transport(clnt, xprt, timeout); in rpc_switch_client_transport()
719 oldxps = xprt_iter_xchg_switch(&clnt->cl_xpi, xps); in rpc_switch_client_transport()
721 rpc_unregister_client(clnt); in rpc_switch_client_transport()
722 __rpc_clnt_remove_pipedir(clnt); in rpc_switch_client_transport()
723 rpc_clnt_debugfs_unregister(clnt); in rpc_switch_client_transport()
730 parent = clnt->cl_parent; in rpc_switch_client_transport()
731 clnt->cl_parent = clnt; in rpc_switch_client_transport()
738 err = rpc_client_register(clnt, pseudoflavor, NULL); in rpc_switch_client_transport()
743 if (parent != clnt) in rpc_switch_client_transport()
747 dprintk("RPC: replaced xprt for clnt %p\n", clnt); in rpc_switch_client_transport()
751 xps = xprt_iter_xchg_switch(&clnt->cl_xpi, oldxps); in rpc_switch_client_transport()
752 rpc_clnt_set_transport(clnt, old, old_timeo); in rpc_switch_client_transport()
753 clnt->cl_parent = parent; in rpc_switch_client_transport()
754 rpc_client_register(clnt, pseudoflavor, NULL); in rpc_switch_client_transport()
757 dprintk("RPC: failed to switch xprt for clnt %p\n", clnt); in rpc_switch_client_transport()
763 int rpc_clnt_xprt_iter_init(struct rpc_clnt *clnt, struct rpc_xprt_iter *xpi) in rpc_clnt_xprt_iter_init() argument
768 xps = xprt_switch_get(rcu_dereference(clnt->cl_xpi.xpi_xpswitch)); in rpc_clnt_xprt_iter_init()
788 int rpc_clnt_iterate_for_each_xprt(struct rpc_clnt *clnt, in rpc_clnt_iterate_for_each_xprt() argument
795 ret = rpc_clnt_xprt_iter_init(clnt, &xpi); in rpc_clnt_iterate_for_each_xprt()
803 ret = fn(clnt, xprt, data); in rpc_clnt_iterate_for_each_xprt()
817 void rpc_killall_tasks(struct rpc_clnt *clnt) in rpc_killall_tasks() argument
822 if (list_empty(&clnt->cl_tasks)) in rpc_killall_tasks()
824 dprintk("RPC: killing all tasks for client %p\n", clnt); in rpc_killall_tasks()
828 spin_lock(&clnt->cl_lock); in rpc_killall_tasks()
829 list_for_each_entry(rovr, &clnt->cl_tasks, tk_task) { in rpc_killall_tasks()
840 spin_unlock(&clnt->cl_lock); in rpc_killall_tasks()
848 void rpc_shutdown_client(struct rpc_clnt *clnt) in rpc_shutdown_client() argument
853 clnt->cl_program->name, in rpc_shutdown_client()
854 rcu_dereference(clnt->cl_xprt)->servername); in rpc_shutdown_client()
856 while (!list_empty(&clnt->cl_tasks)) { in rpc_shutdown_client()
857 rpc_killall_tasks(clnt); in rpc_shutdown_client()
859 list_empty(&clnt->cl_tasks), 1*HZ); in rpc_shutdown_client()
862 rpc_release_client(clnt); in rpc_shutdown_client()
870 rpc_free_client(struct rpc_clnt *clnt) in rpc_free_client() argument
875 clnt->cl_program->name, in rpc_free_client()
876 rcu_dereference(clnt->cl_xprt)->servername); in rpc_free_client()
877 if (clnt->cl_parent != clnt) in rpc_free_client()
878 parent = clnt->cl_parent; in rpc_free_client()
879 rpc_clnt_debugfs_unregister(clnt); in rpc_free_client()
880 rpc_clnt_remove_pipedir(clnt); in rpc_free_client()
881 rpc_unregister_client(clnt); in rpc_free_client()
882 rpc_free_iostats(clnt->cl_metrics); in rpc_free_client()
883 clnt->cl_metrics = NULL; in rpc_free_client()
884 xprt_put(rcu_dereference_raw(clnt->cl_xprt)); in rpc_free_client()
885 xprt_iter_destroy(&clnt->cl_xpi); in rpc_free_client()
887 rpc_free_clid(clnt); in rpc_free_client()
888 kfree(clnt); in rpc_free_client()
896 rpc_free_auth(struct rpc_clnt *clnt) in rpc_free_auth() argument
898 if (clnt->cl_auth == NULL) in rpc_free_auth()
899 return rpc_free_client(clnt); in rpc_free_auth()
906 atomic_inc(&clnt->cl_count); in rpc_free_auth()
907 rpcauth_release(clnt->cl_auth); in rpc_free_auth()
908 clnt->cl_auth = NULL; in rpc_free_auth()
909 if (atomic_dec_and_test(&clnt->cl_count)) in rpc_free_auth()
910 return rpc_free_client(clnt); in rpc_free_auth()
918 rpc_release_client(struct rpc_clnt *clnt) in rpc_release_client() argument
920 dprintk("RPC: rpc_release_client(%p)\n", clnt); in rpc_release_client()
923 if (list_empty(&clnt->cl_tasks)) in rpc_release_client()
925 if (!atomic_dec_and_test(&clnt->cl_count)) in rpc_release_client()
927 clnt = rpc_free_auth(clnt); in rpc_release_client()
928 } while (clnt != NULL); in rpc_release_client()
952 struct rpc_clnt *clnt; in rpc_bind_new_program() local
955 clnt = __rpc_clone_client(&args, old); in rpc_bind_new_program()
956 if (IS_ERR(clnt)) in rpc_bind_new_program()
958 err = rpc_ping(clnt); in rpc_bind_new_program()
960 rpc_shutdown_client(clnt); in rpc_bind_new_program()
961 clnt = ERR_PTR(err); in rpc_bind_new_program()
964 return clnt; in rpc_bind_new_program()
981 struct rpc_clnt *clnt = task->tk_client; in rpc_task_release_client() local
983 if (clnt != NULL) { in rpc_task_release_client()
985 spin_lock(&clnt->cl_lock); in rpc_task_release_client()
987 spin_unlock(&clnt->cl_lock); in rpc_task_release_client()
990 rpc_release_client(clnt); in rpc_task_release_client()
996 void rpc_task_set_transport(struct rpc_task *task, struct rpc_clnt *clnt) in rpc_task_set_transport() argument
999 task->tk_xprt = xprt_iter_get_next(&clnt->cl_xpi); in rpc_task_set_transport()
1003 void rpc_task_set_client(struct rpc_task *task, struct rpc_clnt *clnt) in rpc_task_set_client() argument
1006 if (clnt != NULL) { in rpc_task_set_client()
1007 rpc_task_set_transport(task, clnt); in rpc_task_set_client()
1008 task->tk_client = clnt; in rpc_task_set_client()
1009 atomic_inc(&clnt->cl_count); in rpc_task_set_client()
1010 if (clnt->cl_softrtry) in rpc_task_set_client()
1012 if (clnt->cl_noretranstimeo) in rpc_task_set_client()
1014 if (atomic_read(&clnt->cl_swapper)) in rpc_task_set_client()
1017 spin_lock(&clnt->cl_lock); in rpc_task_set_client()
1018 list_add_tail(&task->tk_task, &clnt->cl_tasks); in rpc_task_set_client()
1019 spin_unlock(&clnt->cl_lock); in rpc_task_set_client()
1075 int rpc_call_sync(struct rpc_clnt *clnt, const struct rpc_message *msg, int flags) in rpc_call_sync() argument
1079 .rpc_client = clnt, in rpc_call_sync()
1111 rpc_call_async(struct rpc_clnt *clnt, const struct rpc_message *msg, int flags, in rpc_call_async() argument
1116 .rpc_client = clnt, in rpc_call_async()
1185 size_t rpc_peeraddr(struct rpc_clnt *clnt, struct sockaddr *buf, size_t bufsize) in rpc_peeraddr() argument
1191 xprt = rcu_dereference(clnt->cl_xprt); in rpc_peeraddr()
1212 const char *rpc_peeraddr2str(struct rpc_clnt *clnt, in rpc_peeraddr2str() argument
1217 xprt = rcu_dereference(clnt->cl_xprt); in rpc_peeraddr2str()
1350 int rpc_localaddr(struct rpc_clnt *clnt, struct sockaddr *buf, size_t buflen) in rpc_localaddr() argument
1360 xprt = rcu_dereference(clnt->cl_xprt); in rpc_localaddr()
1377 rpc_setbufsize(struct rpc_clnt *clnt, unsigned int sndsize, unsigned int rcvsize) in rpc_setbufsize() argument
1382 xprt = rcu_dereference(clnt->cl_xprt); in rpc_setbufsize()
1394 struct net *rpc_net_ns(struct rpc_clnt *clnt) in rpc_net_ns() argument
1399 ret = rcu_dereference(clnt->cl_xprt)->xprt_net; in rpc_net_ns()
1414 size_t rpc_max_payload(struct rpc_clnt *clnt) in rpc_max_payload() argument
1419 ret = rcu_dereference(clnt->cl_xprt)->max_payload; in rpc_max_payload()
1429 size_t rpc_max_bc_payload(struct rpc_clnt *clnt) in rpc_max_bc_payload() argument
1435 xprt = rcu_dereference(clnt->cl_xprt); in rpc_max_bc_payload()
1447 void rpc_force_rebind(struct rpc_clnt *clnt) in rpc_force_rebind() argument
1449 if (clnt->cl_autobind) { in rpc_force_rebind()
1451 xprt_clear_bound(rcu_dereference(clnt->cl_xprt)); in rpc_force_rebind()
1512 struct rpc_clnt *clnt = task->tk_client; in call_start() local
1517 clnt->cl_program->name, clnt->cl_vers, in call_start()
1522 if (clnt->cl_program->version[clnt->cl_vers]) in call_start()
1523 clnt->cl_program->version[clnt->cl_vers]->counts[idx]++; in call_start()
1524 clnt->cl_stats->rpccnt++; in call_start()
1526 rpc_task_set_transport(task, clnt); in call_start()
1898 struct rpc_clnt *clnt = task->tk_client; in call_connect_status() local
1910 if (clnt->cl_autobind) { in call_connect_status()
1911 rpc_force_rebind(clnt); in call_connect_status()
1937 clnt->cl_stats->netreconn++; in call_connect_status()
2127 struct rpc_clnt *clnt = task->tk_client; in call_status() local
2169 rpc_force_rebind(clnt); in call_status()
2189 if (clnt->cl_chatty) in call_status()
2191 clnt->cl_program->name, -status); in call_status()
2204 struct rpc_clnt *clnt = task->tk_client; in call_timeout() local
2219 if (clnt->cl_chatty) { in call_timeout()
2221 clnt->cl_program->name, in call_timeout()
2233 if (clnt->cl_chatty) { in call_timeout()
2235 clnt->cl_program->name, in call_timeout()
2239 rpc_force_rebind(clnt); in call_timeout()
2257 struct rpc_clnt *clnt = task->tk_client; in call_decode() local
2265 if (clnt->cl_chatty) { in call_decode()
2267 clnt->cl_program->name, in call_decode()
2290 clnt->cl_program->name, task->tk_status); in call_decode()
2325 struct rpc_clnt *clnt = task->tk_client; in rpc_encode_header() local
2335 *p++ = htonl(clnt->cl_prog); /* program number */ in rpc_encode_header()
2336 *p++ = htonl(clnt->cl_vers); /* program version */ in rpc_encode_header()
2346 struct rpc_clnt *clnt = task->tk_client; in rpc_verify_header() local
2451 (unsigned int)clnt->cl_prog, in rpc_verify_header()
2458 (unsigned int)clnt->cl_prog, in rpc_verify_header()
2459 (unsigned int)clnt->cl_vers, in rpc_verify_header()
2468 clnt->cl_prog, clnt->cl_vers, in rpc_verify_header()
2483 clnt->cl_stats->rpcgarbage++; in rpc_verify_header()
2519 static int rpc_ping(struct rpc_clnt *clnt) in rpc_ping() argument
2526 err = rpc_call_sync(clnt, &msg, RPC_TASK_SOFT | RPC_TASK_SOFTCONN); in rpc_ping()
2532 struct rpc_task *rpc_call_null_helper(struct rpc_clnt *clnt, in rpc_call_null_helper() argument
2541 .rpc_client = clnt, in rpc_call_null_helper()
2552 struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags) in rpc_call_null() argument
2554 return rpc_call_null_helper(clnt, NULL, cred, flags, NULL, NULL); in rpc_call_null()
2592 int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt, in rpc_clnt_test_and_add_xprt() argument
2607 task = rpc_call_null_helper(clnt, xprt, cred, in rpc_clnt_test_and_add_xprt()
2636 int rpc_clnt_setup_test_and_add_xprt(struct rpc_clnt *clnt, in rpc_clnt_setup_test_and_add_xprt() argument
2654 task = rpc_call_null_helper(clnt, xprt, cred, in rpc_clnt_setup_test_and_add_xprt()
2669 xtest->add_xprt_test(clnt, xprt, xtest->data); in rpc_clnt_setup_test_and_add_xprt()
2695 int rpc_clnt_add_xprt(struct rpc_clnt *clnt, in rpc_clnt_add_xprt() argument
2711 xps = xprt_switch_get(rcu_dereference(clnt->cl_xpi.xpi_xpswitch)); in rpc_clnt_add_xprt()
2712 xprt = xprt_iter_xprt(&clnt->cl_xpi); in rpc_clnt_add_xprt()
2735 ret = setup(clnt, xps, xprt, data); in rpc_clnt_add_xprt()
2754 rpc_xprt_set_connect_timeout(struct rpc_clnt *clnt, in rpc_xprt_set_connect_timeout() argument
2768 rpc_set_connect_timeout(struct rpc_clnt *clnt, in rpc_set_connect_timeout() argument
2776 rpc_clnt_iterate_for_each_xprt(clnt, in rpc_set_connect_timeout()
2782 void rpc_clnt_xprt_switch_put(struct rpc_clnt *clnt) in rpc_clnt_xprt_switch_put() argument
2785 xprt_switch_put(rcu_dereference(clnt->cl_xpi.xpi_xpswitch)); in rpc_clnt_xprt_switch_put()
2790 void rpc_clnt_xprt_switch_add_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt) in rpc_clnt_xprt_switch_add_xprt() argument
2793 rpc_xprt_switch_add_xprt(rcu_dereference(clnt->cl_xpi.xpi_xpswitch), in rpc_clnt_xprt_switch_add_xprt()
2799 bool rpc_clnt_xprt_switch_has_addr(struct rpc_clnt *clnt, in rpc_clnt_xprt_switch_has_addr() argument
2806 xps = rcu_dereference(clnt->cl_xpi.xpi_xpswitch); in rpc_clnt_xprt_switch_has_addr()
2820 static void rpc_show_task(const struct rpc_clnt *clnt, in rpc_show_task() argument
2830 clnt, task->tk_rqstp, task->tk_timeout, task->tk_ops, in rpc_show_task()
2831 clnt->cl_program->name, clnt->cl_vers, rpc_proc_name(task), in rpc_show_task()
2837 struct rpc_clnt *clnt; in rpc_show_tasks() local
2843 list_for_each_entry(clnt, &sn->all_clients, cl_clients) { in rpc_show_tasks()
2844 spin_lock(&clnt->cl_lock); in rpc_show_tasks()
2845 list_for_each_entry(task, &clnt->cl_tasks, tk_task) { in rpc_show_tasks()
2850 rpc_show_task(clnt, task); in rpc_show_tasks()
2852 spin_unlock(&clnt->cl_lock); in rpc_show_tasks()
2860 rpc_clnt_swap_activate_callback(struct rpc_clnt *clnt, in rpc_clnt_swap_activate_callback() argument
2868 rpc_clnt_swap_activate(struct rpc_clnt *clnt) in rpc_clnt_swap_activate() argument
2870 if (atomic_inc_return(&clnt->cl_swapper) == 1) in rpc_clnt_swap_activate()
2871 return rpc_clnt_iterate_for_each_xprt(clnt, in rpc_clnt_swap_activate()
2878 rpc_clnt_swap_deactivate_callback(struct rpc_clnt *clnt, in rpc_clnt_swap_deactivate_callback() argument
2887 rpc_clnt_swap_deactivate(struct rpc_clnt *clnt) in rpc_clnt_swap_deactivate() argument
2889 if (atomic_dec_if_positive(&clnt->cl_swapper) == 0) in rpc_clnt_swap_deactivate()
2890 rpc_clnt_iterate_for_each_xprt(clnt, in rpc_clnt_swap_deactivate()