Lines Matching refs:clp

106 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp,
471 struct nfs_client *clp = server->nfs_client; in nfs4_do_handle_exception() local
525 nfs4_schedule_lease_recovery(clp); in nfs4_do_handle_exception()
533 nfs4_schedule_lease_moved_recovery(clp); in nfs4_do_handle_exception()
593 struct nfs_client *clp = server->nfs_client; in nfs4_handle_exception() local
605 ret = nfs4_wait_clnt_recover(clp); in nfs4_handle_exception()
621 struct nfs_client *clp = server->nfs_client; in nfs4_async_handle_exception() local
632 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_exception()
633 if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) in nfs4_async_handle_exception()
634 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); in nfs4_async_handle_exception()
679 static bool _nfs4_is_integrity_protected(struct nfs_client *clp) in _nfs4_is_integrity_protected() argument
681 rpc_authflavor_t flavor = clp->cl_rpcclient->cl_auth->au_flavor; in _nfs4_is_integrity_protected()
685 static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp) in do_renew_lease() argument
687 spin_lock(&clp->cl_lock); in do_renew_lease()
688 if (time_before(clp->cl_last_renewal,timestamp)) in do_renew_lease()
689 clp->cl_last_renewal = timestamp; in do_renew_lease()
690 spin_unlock(&clp->cl_lock); in do_renew_lease()
695 struct nfs_client *clp = server->nfs_client; in renew_lease() local
697 if (!nfs4_has_session(clp)) in renew_lease()
698 do_renew_lease(clp, timestamp); in renew_lease()
776 nfs41_notify_server(session->clp); in nfs41_release_slot()
812 struct nfs_client *clp; in nfs41_sequence_process() local
823 clp = session->clp; in nfs41_sequence_process()
838 do_renew_lease(clp, res->sr_timestamp); in nfs41_sequence_process()
840 nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags, in nfs41_sequence_process()
893 nfs4_probe_sequence(clp, task->tk_msg.rpc_cred, slot); in nfs41_sequence_process()
1144 struct nfs_client *clp = server->nfs_client; in nfs4_do_call_sync() local
1153 .callback_ops = clp->cl_mvops->call_sync_ops, in nfs4_do_call_sync()
1571 struct nfs_client *clp = state->owner->so_server->nfs_client; in nfs_test_and_clear_all_open_stateid() local
1581 nfs4_state_mark_reclaim_nograce(clp, state); in nfs_test_and_clear_all_open_stateid()
1789 struct nfs_client *clp = server->nfs_client; in update_open_stateid() local
1831 nfs4_schedule_state_manager(clp); in update_open_stateid()
1921 struct nfs_client *clp = NFS_SERVER(state->inode)->nfs_client; in nfs4_opendata_check_deleg() local
1938 clp->cl_hostname); in nfs4_opendata_check_deleg()
2418 struct nfs_client *clp = sp->so_server->nfs_client; in nfs4_open_prepare() local
2440 data->o_arg.clientid = clp->cl_clientid; in nfs4_open_prepare()
2463 if (nfs4_has_persistent_session(clp)) in nfs4_open_prepare()
2465 else if (clp->cl_mvops->minor_version > 0) in nfs4_open_prepare()
5591 struct nfs_client *clp = data->client; in nfs4_renew_release() local
5593 if (refcount_read(&clp->cl_count) > 1) in nfs4_renew_release()
5594 nfs4_schedule_state_renewal(clp); in nfs4_renew_release()
5595 nfs_put_client(clp); in nfs4_renew_release()
5602 struct nfs_client *clp = data->client; in nfs4_renew_done() local
5605 trace_nfs4_renew_async(clp, task->tk_status); in nfs4_renew_done()
5610 nfs4_schedule_lease_moved_recovery(clp); in nfs4_renew_done()
5614 if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) == 0) in nfs4_renew_done()
5617 nfs4_schedule_lease_recovery(clp); in nfs4_renew_done()
5620 nfs4_schedule_path_down_recovery(clp); in nfs4_renew_done()
5622 do_renew_lease(clp, timestamp); in nfs4_renew_done()
5630 static int nfs4_proc_async_renew(struct nfs_client *clp, const struct cred *cred, unsigned renew_fl… in nfs4_proc_async_renew() argument
5634 .rpc_argp = clp, in nfs4_proc_async_renew()
5641 if (!refcount_inc_not_zero(&clp->cl_count)) in nfs4_proc_async_renew()
5645 nfs_put_client(clp); in nfs4_proc_async_renew()
5648 data->client = clp; in nfs4_proc_async_renew()
5650 return rpc_call_async(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT, in nfs4_proc_async_renew()
5654 static int nfs4_proc_renew(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_renew() argument
5658 .rpc_argp = clp, in nfs4_proc_renew()
5664 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_renew()
5667 do_renew_lease(clp, now); in nfs4_proc_renew()
6119 static void nfs4_init_boot_verifier(const struct nfs_client *clp, in nfs4_init_boot_verifier() argument
6124 if (test_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state)) { in nfs4_init_boot_verifier()
6130 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs4_init_boot_verifier()
6140 nfs4_get_uniquifier(struct nfs_client *clp, char *buf, size_t buflen) in nfs4_get_uniquifier() argument
6142 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs4_get_uniquifier()
6163 nfs4_init_nonuniform_client_string(struct nfs_client *clp) in nfs4_init_nonuniform_client_string() argument
6170 if (clp->cl_owner_id != NULL) in nfs4_init_nonuniform_client_string()
6175 strlen(clp->cl_rpcclient->cl_nodename) + in nfs4_init_nonuniform_client_string()
6177 strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)) + in nfs4_init_nonuniform_client_string()
6181 buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf)); in nfs4_init_nonuniform_client_string()
6200 clp->cl_rpcclient->cl_nodename, buf, in nfs4_init_nonuniform_client_string()
6201 rpc_peeraddr2str(clp->cl_rpcclient, in nfs4_init_nonuniform_client_string()
6205 clp->cl_rpcclient->cl_nodename, in nfs4_init_nonuniform_client_string()
6206 rpc_peeraddr2str(clp->cl_rpcclient, in nfs4_init_nonuniform_client_string()
6210 clp->cl_owner_id = str; in nfs4_init_nonuniform_client_string()
6215 nfs4_init_uniform_client_string(struct nfs_client *clp) in nfs4_init_uniform_client_string() argument
6222 if (clp->cl_owner_id != NULL) in nfs4_init_uniform_client_string()
6226 strlen(clp->cl_rpcclient->cl_nodename) + 1; in nfs4_init_uniform_client_string()
6228 buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf)); in nfs4_init_uniform_client_string()
6246 clp->rpc_ops->version, clp->cl_minorversion, in nfs4_init_uniform_client_string()
6247 buf, clp->cl_rpcclient->cl_nodename); in nfs4_init_uniform_client_string()
6250 clp->rpc_ops->version, clp->cl_minorversion, in nfs4_init_uniform_client_string()
6251 clp->cl_rpcclient->cl_nodename); in nfs4_init_uniform_client_string()
6252 clp->cl_owner_id = str; in nfs4_init_uniform_client_string()
6262 nfs4_init_callback_netid(const struct nfs_client *clp, char *buf, size_t len) in nfs4_init_callback_netid() argument
6264 if (strchr(clp->cl_ipaddr, ':') != NULL) in nfs4_init_callback_netid()
6292 int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, in nfs4_proc_setclientid() argument
6300 .sc_clnt = clp, in nfs4_proc_setclientid()
6309 .rpc_client = clp->cl_rpcclient, in nfs4_proc_setclientid()
6319 nfs4_init_boot_verifier(clp, &sc_verifier); in nfs4_proc_setclientid()
6321 if (test_bit(NFS_CS_MIGRATION, &clp->cl_flags)) in nfs4_proc_setclientid()
6322 status = nfs4_init_uniform_client_string(clp); in nfs4_proc_setclientid()
6324 status = nfs4_init_nonuniform_client_string(clp); in nfs4_proc_setclientid()
6331 nfs4_init_callback_netid(clp, in nfs4_proc_setclientid()
6336 clp->cl_ipaddr, port >> 8, port & 255); in nfs4_proc_setclientid()
6339 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid()
6340 clp->cl_owner_id); in nfs4_proc_setclientid()
6344 kfree(clp->cl_acceptor); in nfs4_proc_setclientid()
6345 clp->cl_acceptor = rpcauth_stringify_acceptor(setclientid.sc_cred); in nfs4_proc_setclientid()
6350 do_renew_lease(clp, now); in nfs4_proc_setclientid()
6352 trace_nfs4_setclientid(clp, status); in nfs4_proc_setclientid()
6365 int nfs4_proc_setclientid_confirm(struct nfs_client *clp, in nfs4_proc_setclientid_confirm() argument
6377 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid_confirm()
6378 clp->cl_clientid); in nfs4_proc_setclientid_confirm()
6379 status = rpc_call_sync(clp->cl_rpcclient, &msg, in nfs4_proc_setclientid_confirm()
6381 trace_nfs4_setclientid_confirm(clp, status); in nfs4_proc_setclientid_confirm()
6612 struct nfs_client *clp = server->nfs_client; in _nfs4_proc_getlk() local
6629 arg.lock_owner.clientid = clp->cl_clientid; in _nfs4_proc_getlk()
7342 struct nfs_client *clp = server->nfs_client; in nfs4_retry_setlk() local
7343 wait_queue_head_t *q = &clp->cl_lock_waitq; in nfs4_retry_setlk()
7344 struct nfs_lowner owner = { .clientid = clp->cl_clientid, in nfs4_retry_setlk()
7946 struct nfs_client *clp = server->nfs_client; in nfs4_proc_get_locations() local
7948 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_get_locations()
7957 clp->cl_hostname); in nfs4_proc_get_locations()
7979 struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; in _nfs40_proc_fsid_present() local
7983 .clientid = clp->cl_clientid, in _nfs40_proc_fsid_present()
8009 do_renew_lease(clp, now); in _nfs40_proc_fsid_present()
8072 struct nfs_client *clp = server->nfs_client; in nfs4_proc_fsid_present() local
8074 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_fsid_present()
8083 clp->cl_hostname); in nfs4_proc_fsid_present()
8106 struct nfs_client *clp = NFS_SERVER(dir)->nfs_client; in _nfs4_proc_secinfo() local
8127 .callback_ops = clp->cl_mvops->call_sync_ops, in _nfs4_proc_secinfo()
8134 clnt = clp->cl_rpcclient; in _nfs4_proc_secinfo()
8137 cred = nfs4_get_clid_cred(clp); in _nfs4_proc_secinfo()
8143 nfs4_state_protect(clp, NFS_SP4_MACH_CRED_SECINFO, &clnt, &msg); in _nfs4_proc_secinfo()
8219 struct nfs_client *clp = args->client; in nfs4_bind_one_conn_to_session_done() local
8224 nfs4_schedule_session_recovery(clp->cl_session, in nfs4_bind_one_conn_to_session_done()
8249 struct nfs_client *clp, in nfs4_proc_bind_one_conn_to_session() argument
8254 .client = clp, in nfs4_proc_bind_one_conn_to_session()
8275 nfs4_copy_sessionid(&args.sessionid, &clp->cl_session->sess_id); in nfs4_proc_bind_one_conn_to_session()
8276 if (!(clp->cl_session->flags & SESSION4_BACK_CHAN)) in nfs4_proc_bind_one_conn_to_session()
8289 trace_nfs4_bind_conn_to_session(clp, status); in nfs4_proc_bind_one_conn_to_session()
8292 clp->cl_session->sess_id.data, NFS4_MAX_SESSIONID_LEN)) { in nfs4_proc_bind_one_conn_to_session()
8312 struct nfs_client *clp; member
8323 return nfs4_proc_bind_one_conn_to_session(clnt, xprt, p->clp, p->cred); in nfs4_proc_bind_conn_to_session_callback()
8326 int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_bind_conn_to_session() argument
8329 .clp = clp, in nfs4_proc_bind_conn_to_session()
8332 return rpc_clnt_iterate_for_each_xprt(clp->cl_rpcclient, in nfs4_proc_bind_conn_to_session()
8370 static int nfs4_sp4_select_mode(struct nfs_client *clp, in nfs4_sp4_select_mode() argument
8461 clp->cl_sp4_flags = flags; in nfs4_sp4_select_mode()
8492 nfs4_run_exchange_id(struct nfs_client *clp, const struct cred *cred, in nfs4_run_exchange_id() argument
8500 .rpc_client = clp->cl_rpcclient, in nfs4_run_exchange_id()
8508 if (!refcount_inc_not_zero(&clp->cl_count)) in nfs4_run_exchange_id()
8516 nfs4_init_boot_verifier(clp, &calldata->args.verifier); in nfs4_run_exchange_id()
8518 status = nfs4_init_uniform_client_string(clp); in nfs4_run_exchange_id()
8555 memcpy(calldata->args.verifier.data, clp->cl_confirm.data, in nfs4_run_exchange_id()
8558 calldata->args.client = clp; in nfs4_run_exchange_id()
8579 nfs_put_client(clp); in nfs4_run_exchange_id()
8588 static int _nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred, in _nfs4_proc_exchange_id() argument
8597 task = nfs4_run_exchange_id(clp, cred, sp4_how, NULL); in _nfs4_proc_exchange_id()
8608 clp->cl_mvops->minor_version); in _nfs4_proc_exchange_id()
8612 status = nfs4_sp4_select_mode(clp, &resp->state_protect); in _nfs4_proc_exchange_id()
8616 do_renew_lease(clp, now); in _nfs4_proc_exchange_id()
8618 clp->cl_clientid = resp->clientid; in _nfs4_proc_exchange_id()
8619 clp->cl_exchange_flags = resp->flags; in _nfs4_proc_exchange_id()
8620 clp->cl_seqid = resp->seqid; in _nfs4_proc_exchange_id()
8624 &clp->cl_session->session_state); in _nfs4_proc_exchange_id()
8626 if (clp->cl_serverscope != NULL && in _nfs4_proc_exchange_id()
8627 !nfs41_same_server_scope(clp->cl_serverscope, in _nfs4_proc_exchange_id()
8631 set_bit(NFS4CLNT_SERVER_SCOPE_MISMATCH, &clp->cl_state); in _nfs4_proc_exchange_id()
8634 swap(clp->cl_serverowner, resp->server_owner); in _nfs4_proc_exchange_id()
8635 swap(clp->cl_serverscope, resp->server_scope); in _nfs4_proc_exchange_id()
8636 swap(clp->cl_implid, resp->impl_id); in _nfs4_proc_exchange_id()
8639 memcpy(clp->cl_confirm.data, argp->verifier.data, in _nfs4_proc_exchange_id()
8640 sizeof(clp->cl_confirm.data)); in _nfs4_proc_exchange_id()
8642 trace_nfs4_exchange_id(clp, status); in _nfs4_proc_exchange_id()
8659 int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_exchange_id() argument
8661 rpc_authflavor_t authflavor = clp->cl_rpcclient->cl_auth->au_flavor; in nfs4_proc_exchange_id()
8667 status = _nfs4_proc_exchange_id(clp, cred, SP4_MACH_CRED); in nfs4_proc_exchange_id()
8673 return _nfs4_proc_exchange_id(clp, cred, SP4_NONE); in nfs4_proc_exchange_id()
8703 sp4_how = (adata->clp->cl_sp4_flags == 0 ? SP4_NONE : SP4_MACH_CRED); in nfs4_test_session_trunk()
8706 task = nfs4_run_exchange_id(adata->clp, adata->cred, sp4_how, xprt); in nfs4_test_session_trunk()
8712 status = nfs4_detect_session_trunking(adata->clp, in nfs4_test_session_trunk()
8722 static int _nfs4_proc_destroy_clientid(struct nfs_client *clp, in _nfs4_proc_destroy_clientid() argument
8727 .rpc_argp = clp, in _nfs4_proc_destroy_clientid()
8732 status = rpc_call_sync(clp->cl_rpcclient, &msg, in _nfs4_proc_destroy_clientid()
8734 trace_nfs4_destroy_clientid(clp, status); in _nfs4_proc_destroy_clientid()
8737 "DESTROY_CLIENTID.", status, clp->cl_hostname); in _nfs4_proc_destroy_clientid()
8741 static int nfs4_proc_destroy_clientid(struct nfs_client *clp, in nfs4_proc_destroy_clientid() argument
8748 ret = _nfs4_proc_destroy_clientid(clp, cred); in nfs4_proc_destroy_clientid()
8761 int nfs4_destroy_clientid(struct nfs_client *clp) in nfs4_destroy_clientid() argument
8766 if (clp->cl_mvops->minor_version < 1) in nfs4_destroy_clientid()
8768 if (clp->cl_exchange_flags == 0) in nfs4_destroy_clientid()
8770 if (clp->cl_preserve_clid) in nfs4_destroy_clientid()
8772 cred = nfs4_get_clid_cred(clp); in nfs4_destroy_clientid()
8773 ret = nfs4_proc_destroy_clientid(clp, cred); in nfs4_destroy_clientid()
8778 clp->cl_exchange_flags = 0; in nfs4_destroy_clientid()
8789 struct nfs_client *clp; member
8801 nfs4_setup_sequence(data->clp, in nfs4_get_lease_time_prepare()
8839 int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) in nfs4_proc_get_lease_time() argument
8848 .clp = clp, in nfs4_proc_get_lease_time()
8856 .rpc_client = clp->cl_rpcclient, in nfs4_proc_get_lease_time()
8978 session->clp->cl_exchange_flags |= EXCHGID4_FLAG_CONFIRMED_R; in nfs4_update_session()
8987 static int _nfs4_proc_create_session(struct nfs_client *clp, in _nfs4_proc_create_session() argument
8990 struct nfs4_session *session = clp->cl_session; in _nfs4_proc_create_session()
8992 .client = clp, in _nfs4_proc_create_session()
8993 .clientid = clp->cl_clientid, in _nfs4_proc_create_session()
8994 .seqid = clp->cl_seqid, in _nfs4_proc_create_session()
9007 nfs4_init_channel_attrs(&args, clp->cl_rpcclient); in _nfs4_proc_create_session()
9010 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, in _nfs4_proc_create_session()
9012 trace_nfs4_create_session(clp, status); in _nfs4_proc_create_session()
9023 clp->cl_seqid++; in _nfs4_proc_create_session()
9041 int nfs4_proc_create_session(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_create_session() argument
9045 struct nfs4_session *session = clp->cl_session; in nfs4_proc_create_session()
9047 dprintk("--> %s clp=%p session=%p\n", __func__, clp, session); in nfs4_proc_create_session()
9049 status = _nfs4_proc_create_session(clp, cred); in nfs4_proc_create_session()
9061 clp->cl_seqid, ptr[0], ptr[1], ptr[2], ptr[3]); in nfs4_proc_create_session()
9087 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, in nfs4_proc_destroy_session()
9089 trace_nfs4_destroy_session(session->clp, status); in nfs4_proc_destroy_session()
9103 struct nfs_client *clp; member
9111 struct nfs_client *clp = calldata->clp; in nfs41_sequence_release() local
9113 if (refcount_read(&clp->cl_count) > 1) in nfs41_sequence_release()
9114 nfs4_schedule_state_renewal(clp); in nfs41_sequence_release()
9115 nfs_put_client(clp); in nfs41_sequence_release()
9119 static int nfs41_sequence_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_sequence_handle_errors() argument
9126 nfs4_schedule_lease_recovery(clp); in nfs41_sequence_handle_errors()
9134 struct nfs_client *clp = calldata->clp; in nfs41_sequence_call_done() local
9139 trace_nfs4_sequence(clp, task->tk_status); in nfs41_sequence_call_done()
9142 if (refcount_read(&clp->cl_count) == 1) in nfs41_sequence_call_done()
9145 if (nfs41_sequence_handle_errors(task, clp) == -EAGAIN) { in nfs41_sequence_call_done()
9158 struct nfs_client *clp = calldata->clp; in nfs41_sequence_prepare() local
9165 nfs4_setup_sequence(clp, args, res, task); in nfs41_sequence_prepare()
9174 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, in _nfs41_proc_sequence() argument
9185 .rpc_client = clp->cl_rpcclient, in _nfs41_proc_sequence()
9193 if (!refcount_inc_not_zero(&clp->cl_count)) in _nfs41_proc_sequence()
9204 calldata->clp = clp; in _nfs41_proc_sequence()
9212 nfs_put_client(clp); in _nfs41_proc_sequence()
9218 static int nfs41_proc_async_sequence(struct nfs_client *clp, const struct cred *cred, unsigned rene… in nfs41_proc_async_sequence() argument
9225 task = _nfs41_proc_sequence(clp, cred, NULL, false); in nfs41_proc_async_sequence()
9234 static int nfs4_proc_sequence(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_sequence() argument
9239 task = _nfs41_proc_sequence(clp, cred, NULL, true); in nfs4_proc_sequence()
9254 struct nfs_client *clp; member
9263 nfs4_setup_sequence(calldata->clp, in nfs4_reclaim_complete_prepare()
9269 static int nfs41_reclaim_complete_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_reclaim_complete_handle_errors() argument
9273 wake_up_all(&clp->cl_lock_waitq); in nfs41_reclaim_complete_handle_errors()
9284 __func__, task->tk_status, clp->cl_hostname); in nfs41_reclaim_complete_handle_errors()
9291 nfs4_schedule_lease_recovery(clp); in nfs41_reclaim_complete_handle_errors()
9299 struct nfs_client *clp = calldata->clp; in nfs4_reclaim_complete_done() local
9306 trace_nfs4_reclaim_complete(clp, task->tk_status); in nfs4_reclaim_complete_done()
9307 if (nfs41_reclaim_complete_handle_errors(task, clp) == -EAGAIN) { in nfs4_reclaim_complete_done()
9330 static int nfs41_proc_reclaim_complete(struct nfs_client *clp, in nfs41_proc_reclaim_complete() argument
9339 .rpc_client = clp->cl_rpcclient, in nfs41_proc_reclaim_complete()
9350 calldata->clp = clp; in nfs41_proc_reclaim_complete()
9564 nfs4_setup_sequence(lrp->clp, in nfs4_layoutreturn_prepare()