Lines Matching refs:clp
102 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp,
461 struct nfs_client *clp = server->nfs_client; in nfs4_do_handle_exception() local
515 nfs4_schedule_lease_recovery(clp); in nfs4_do_handle_exception()
523 nfs4_schedule_lease_moved_recovery(clp); in nfs4_do_handle_exception()
583 struct nfs_client *clp = server->nfs_client; in nfs4_handle_exception() local
595 ret = nfs4_wait_clnt_recover(clp); in nfs4_handle_exception()
611 struct nfs_client *clp = server->nfs_client; in nfs4_async_handle_exception() local
622 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_exception()
623 if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) in nfs4_async_handle_exception()
624 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); in nfs4_async_handle_exception()
669 static bool _nfs4_is_integrity_protected(struct nfs_client *clp) in _nfs4_is_integrity_protected() argument
671 rpc_authflavor_t flavor = clp->cl_rpcclient->cl_auth->au_flavor; in _nfs4_is_integrity_protected()
675 static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp) in do_renew_lease() argument
677 spin_lock(&clp->cl_lock); in do_renew_lease()
678 if (time_before(clp->cl_last_renewal,timestamp)) in do_renew_lease()
679 clp->cl_last_renewal = timestamp; in do_renew_lease()
680 spin_unlock(&clp->cl_lock); in do_renew_lease()
685 struct nfs_client *clp = server->nfs_client; in renew_lease() local
687 if (!nfs4_has_session(clp)) in renew_lease()
688 do_renew_lease(clp, timestamp); in renew_lease()
766 nfs41_notify_server(session->clp); in nfs41_release_slot()
803 struct nfs_client *clp; in nfs41_sequence_process() local
814 clp = session->clp; in nfs41_sequence_process()
829 do_renew_lease(clp, res->sr_timestamp); in nfs41_sequence_process()
831 nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags, in nfs41_sequence_process()
885 nfs4_probe_sequence(clp, task->tk_msg.rpc_cred, slot); in nfs41_sequence_process()
1136 struct nfs_client *clp = server->nfs_client; in nfs4_do_call_sync() local
1145 .callback_ops = clp->cl_mvops->call_sync_ops, in nfs4_do_call_sync()
1579 struct nfs_client *clp = state->owner->so_server->nfs_client; in nfs_test_and_clear_all_open_stateid() local
1589 nfs4_state_mark_reclaim_nograce(clp, state); in nfs_test_and_clear_all_open_stateid()
1797 struct nfs_client *clp = server->nfs_client; in update_open_stateid() local
1839 nfs4_schedule_state_manager(clp); in update_open_stateid()
1929 struct nfs_client *clp = NFS_SERVER(state->inode)->nfs_client; in nfs4_opendata_check_deleg() local
1946 clp->cl_hostname); in nfs4_opendata_check_deleg()
2427 struct nfs_client *clp = sp->so_server->nfs_client; in nfs4_open_prepare() local
2449 data->o_arg.clientid = clp->cl_clientid; in nfs4_open_prepare()
2472 if (clp->cl_mvops->minor_version == 0) { in nfs4_open_prepare()
2478 } else if (nfs4_has_persistent_session(clp)) in nfs4_open_prepare()
5573 struct nfs_client *clp = data->client; in nfs4_renew_release() local
5575 if (refcount_read(&clp->cl_count) > 1) in nfs4_renew_release()
5576 nfs4_schedule_state_renewal(clp); in nfs4_renew_release()
5577 nfs_put_client(clp); in nfs4_renew_release()
5584 struct nfs_client *clp = data->client; in nfs4_renew_done() local
5587 trace_nfs4_renew_async(clp, task->tk_status); in nfs4_renew_done()
5592 nfs4_schedule_lease_moved_recovery(clp); in nfs4_renew_done()
5596 if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) == 0) in nfs4_renew_done()
5599 nfs4_schedule_lease_recovery(clp); in nfs4_renew_done()
5602 nfs4_schedule_path_down_recovery(clp); in nfs4_renew_done()
5604 do_renew_lease(clp, timestamp); in nfs4_renew_done()
5612 static int nfs4_proc_async_renew(struct nfs_client *clp, const struct cred *cred, unsigned renew_fl… in nfs4_proc_async_renew() argument
5616 .rpc_argp = clp, in nfs4_proc_async_renew()
5623 if (!refcount_inc_not_zero(&clp->cl_count)) in nfs4_proc_async_renew()
5627 nfs_put_client(clp); in nfs4_proc_async_renew()
5630 data->client = clp; in nfs4_proc_async_renew()
5632 return rpc_call_async(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT, in nfs4_proc_async_renew()
5636 static int nfs4_proc_renew(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_renew() argument
5640 .rpc_argp = clp, in nfs4_proc_renew()
5646 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_renew()
5649 do_renew_lease(clp, now); in nfs4_proc_renew()
6087 static void nfs4_init_boot_verifier(const struct nfs_client *clp, in nfs4_init_boot_verifier() argument
6092 if (test_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state)) { in nfs4_init_boot_verifier()
6098 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs4_init_boot_verifier()
6108 nfs4_get_uniquifier(struct nfs_client *clp, char *buf, size_t buflen) in nfs4_get_uniquifier() argument
6110 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs4_get_uniquifier()
6131 nfs4_init_nonuniform_client_string(struct nfs_client *clp) in nfs4_init_nonuniform_client_string() argument
6138 if (clp->cl_owner_id != NULL) in nfs4_init_nonuniform_client_string()
6143 strlen(clp->cl_rpcclient->cl_nodename) + in nfs4_init_nonuniform_client_string()
6145 strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)) + in nfs4_init_nonuniform_client_string()
6149 buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf)); in nfs4_init_nonuniform_client_string()
6168 clp->cl_rpcclient->cl_nodename, buf, in nfs4_init_nonuniform_client_string()
6169 rpc_peeraddr2str(clp->cl_rpcclient, in nfs4_init_nonuniform_client_string()
6173 clp->cl_rpcclient->cl_nodename, in nfs4_init_nonuniform_client_string()
6174 rpc_peeraddr2str(clp->cl_rpcclient, in nfs4_init_nonuniform_client_string()
6178 clp->cl_owner_id = str; in nfs4_init_nonuniform_client_string()
6183 nfs4_init_uniform_client_string(struct nfs_client *clp) in nfs4_init_uniform_client_string() argument
6190 if (clp->cl_owner_id != NULL) in nfs4_init_uniform_client_string()
6194 strlen(clp->cl_rpcclient->cl_nodename) + 1; in nfs4_init_uniform_client_string()
6196 buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf)); in nfs4_init_uniform_client_string()
6214 clp->rpc_ops->version, clp->cl_minorversion, in nfs4_init_uniform_client_string()
6215 buf, clp->cl_rpcclient->cl_nodename); in nfs4_init_uniform_client_string()
6218 clp->rpc_ops->version, clp->cl_minorversion, in nfs4_init_uniform_client_string()
6219 clp->cl_rpcclient->cl_nodename); in nfs4_init_uniform_client_string()
6220 clp->cl_owner_id = str; in nfs4_init_uniform_client_string()
6230 nfs4_init_callback_netid(const struct nfs_client *clp, char *buf, size_t len) in nfs4_init_callback_netid() argument
6232 if (strchr(clp->cl_ipaddr, ':') != NULL) in nfs4_init_callback_netid()
6260 int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, in nfs4_proc_setclientid() argument
6268 .sc_clnt = clp, in nfs4_proc_setclientid()
6277 .rpc_client = clp->cl_rpcclient, in nfs4_proc_setclientid()
6287 nfs4_init_boot_verifier(clp, &sc_verifier); in nfs4_proc_setclientid()
6289 if (test_bit(NFS_CS_MIGRATION, &clp->cl_flags)) in nfs4_proc_setclientid()
6290 status = nfs4_init_uniform_client_string(clp); in nfs4_proc_setclientid()
6292 status = nfs4_init_nonuniform_client_string(clp); in nfs4_proc_setclientid()
6299 nfs4_init_callback_netid(clp, in nfs4_proc_setclientid()
6304 clp->cl_ipaddr, port >> 8, port & 255); in nfs4_proc_setclientid()
6307 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid()
6308 clp->cl_owner_id); in nfs4_proc_setclientid()
6312 kfree(clp->cl_acceptor); in nfs4_proc_setclientid()
6313 clp->cl_acceptor = rpcauth_stringify_acceptor(setclientid.sc_cred); in nfs4_proc_setclientid()
6318 do_renew_lease(clp, now); in nfs4_proc_setclientid()
6320 trace_nfs4_setclientid(clp, status); in nfs4_proc_setclientid()
6333 int nfs4_proc_setclientid_confirm(struct nfs_client *clp, in nfs4_proc_setclientid_confirm() argument
6345 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid_confirm()
6346 clp->cl_clientid); in nfs4_proc_setclientid_confirm()
6347 status = rpc_call_sync(clp->cl_rpcclient, &msg, in nfs4_proc_setclientid_confirm()
6349 trace_nfs4_setclientid_confirm(clp, status); in nfs4_proc_setclientid_confirm()
6578 struct nfs_client *clp = server->nfs_client; in _nfs4_proc_getlk() local
6595 arg.lock_owner.clientid = clp->cl_clientid; in _nfs4_proc_getlk()
7302 struct nfs_client *clp = server->nfs_client; in nfs4_retry_setlk() local
7303 wait_queue_head_t *q = &clp->cl_lock_waitq; in nfs4_retry_setlk()
7306 .owner = { .clientid = clp->cl_clientid, in nfs4_retry_setlk()
7942 struct nfs_client *clp = server->nfs_client; in nfs4_proc_get_locations() local
7944 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_get_locations()
7953 clp->cl_hostname); in nfs4_proc_get_locations()
7975 struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; in _nfs40_proc_fsid_present() local
7979 .clientid = clp->cl_clientid, in _nfs40_proc_fsid_present()
8005 do_renew_lease(clp, now); in _nfs40_proc_fsid_present()
8068 struct nfs_client *clp = server->nfs_client; in nfs4_proc_fsid_present() local
8070 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_fsid_present()
8079 clp->cl_hostname); in nfs4_proc_fsid_present()
8102 struct nfs_client *clp = NFS_SERVER(dir)->nfs_client; in _nfs4_proc_secinfo() local
8123 .callback_ops = clp->cl_mvops->call_sync_ops, in _nfs4_proc_secinfo()
8130 clnt = clp->cl_rpcclient; in _nfs4_proc_secinfo()
8133 cred = nfs4_get_clid_cred(clp); in _nfs4_proc_secinfo()
8139 nfs4_state_protect(clp, NFS_SP4_MACH_CRED_SECINFO, &clnt, &msg); in _nfs4_proc_secinfo()
8215 struct nfs_client *clp = args->client; in nfs4_bind_one_conn_to_session_done() local
8220 nfs4_schedule_session_recovery(clp->cl_session, in nfs4_bind_one_conn_to_session_done()
8244 struct nfs_client *clp, in nfs4_proc_bind_one_conn_to_session() argument
8249 .client = clp, in nfs4_proc_bind_one_conn_to_session()
8270 nfs4_copy_sessionid(&args.sessionid, &clp->cl_session->sess_id); in nfs4_proc_bind_one_conn_to_session()
8271 if (!(clp->cl_session->flags & SESSION4_BACK_CHAN)) in nfs4_proc_bind_one_conn_to_session()
8284 trace_nfs4_bind_conn_to_session(clp, status); in nfs4_proc_bind_one_conn_to_session()
8287 clp->cl_session->sess_id.data, NFS4_MAX_SESSIONID_LEN)) { in nfs4_proc_bind_one_conn_to_session()
8307 struct nfs_client *clp; member
8318 return nfs4_proc_bind_one_conn_to_session(clnt, xprt, p->clp, p->cred); in nfs4_proc_bind_conn_to_session_callback()
8321 int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_bind_conn_to_session() argument
8324 .clp = clp, in nfs4_proc_bind_conn_to_session()
8327 return rpc_clnt_iterate_for_each_xprt(clp->cl_rpcclient, in nfs4_proc_bind_conn_to_session()
8365 static int nfs4_sp4_select_mode(struct nfs_client *clp, in nfs4_sp4_select_mode() argument
8456 clp->cl_sp4_flags = flags; in nfs4_sp4_select_mode()
8487 nfs4_run_exchange_id(struct nfs_client *clp, const struct cred *cred, in nfs4_run_exchange_id() argument
8495 .rpc_client = clp->cl_rpcclient, in nfs4_run_exchange_id()
8503 if (!refcount_inc_not_zero(&clp->cl_count)) in nfs4_run_exchange_id()
8511 nfs4_init_boot_verifier(clp, &calldata->args.verifier); in nfs4_run_exchange_id()
8513 status = nfs4_init_uniform_client_string(clp); in nfs4_run_exchange_id()
8550 memcpy(calldata->args.verifier.data, clp->cl_confirm.data, in nfs4_run_exchange_id()
8553 calldata->args.client = clp; in nfs4_run_exchange_id()
8574 nfs_put_client(clp); in nfs4_run_exchange_id()
8583 static int _nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred, in _nfs4_proc_exchange_id() argument
8592 task = nfs4_run_exchange_id(clp, cred, sp4_how, NULL); in _nfs4_proc_exchange_id()
8603 clp->cl_mvops->minor_version); in _nfs4_proc_exchange_id()
8607 status = nfs4_sp4_select_mode(clp, &resp->state_protect); in _nfs4_proc_exchange_id()
8611 do_renew_lease(clp, now); in _nfs4_proc_exchange_id()
8613 clp->cl_clientid = resp->clientid; in _nfs4_proc_exchange_id()
8614 clp->cl_exchange_flags = resp->flags; in _nfs4_proc_exchange_id()
8615 clp->cl_seqid = resp->seqid; in _nfs4_proc_exchange_id()
8619 &clp->cl_session->session_state); in _nfs4_proc_exchange_id()
8621 if (clp->cl_serverscope != NULL && in _nfs4_proc_exchange_id()
8622 !nfs41_same_server_scope(clp->cl_serverscope, in _nfs4_proc_exchange_id()
8626 set_bit(NFS4CLNT_SERVER_SCOPE_MISMATCH, &clp->cl_state); in _nfs4_proc_exchange_id()
8629 swap(clp->cl_serverowner, resp->server_owner); in _nfs4_proc_exchange_id()
8630 swap(clp->cl_serverscope, resp->server_scope); in _nfs4_proc_exchange_id()
8631 swap(clp->cl_implid, resp->impl_id); in _nfs4_proc_exchange_id()
8634 memcpy(clp->cl_confirm.data, argp->verifier.data, in _nfs4_proc_exchange_id()
8635 sizeof(clp->cl_confirm.data)); in _nfs4_proc_exchange_id()
8637 trace_nfs4_exchange_id(clp, status); in _nfs4_proc_exchange_id()
8654 int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_exchange_id() argument
8656 rpc_authflavor_t authflavor = clp->cl_rpcclient->cl_auth->au_flavor; in nfs4_proc_exchange_id()
8662 status = _nfs4_proc_exchange_id(clp, cred, SP4_MACH_CRED); in nfs4_proc_exchange_id()
8668 return _nfs4_proc_exchange_id(clp, cred, SP4_NONE); in nfs4_proc_exchange_id()
8698 sp4_how = (adata->clp->cl_sp4_flags == 0 ? SP4_NONE : SP4_MACH_CRED); in nfs4_test_session_trunk()
8701 task = nfs4_run_exchange_id(adata->clp, adata->cred, sp4_how, xprt); in nfs4_test_session_trunk()
8707 status = nfs4_detect_session_trunking(adata->clp, in nfs4_test_session_trunk()
8717 static int _nfs4_proc_destroy_clientid(struct nfs_client *clp, in _nfs4_proc_destroy_clientid() argument
8722 .rpc_argp = clp, in _nfs4_proc_destroy_clientid()
8727 status = rpc_call_sync(clp->cl_rpcclient, &msg, in _nfs4_proc_destroy_clientid()
8729 trace_nfs4_destroy_clientid(clp, status); in _nfs4_proc_destroy_clientid()
8732 "DESTROY_CLIENTID.", status, clp->cl_hostname); in _nfs4_proc_destroy_clientid()
8736 static int nfs4_proc_destroy_clientid(struct nfs_client *clp, in nfs4_proc_destroy_clientid() argument
8743 ret = _nfs4_proc_destroy_clientid(clp, cred); in nfs4_proc_destroy_clientid()
8756 int nfs4_destroy_clientid(struct nfs_client *clp) in nfs4_destroy_clientid() argument
8761 if (clp->cl_mvops->minor_version < 1) in nfs4_destroy_clientid()
8763 if (clp->cl_exchange_flags == 0) in nfs4_destroy_clientid()
8765 if (clp->cl_preserve_clid) in nfs4_destroy_clientid()
8767 cred = nfs4_get_clid_cred(clp); in nfs4_destroy_clientid()
8768 ret = nfs4_proc_destroy_clientid(clp, cred); in nfs4_destroy_clientid()
8773 clp->cl_exchange_flags = 0; in nfs4_destroy_clientid()
8784 struct nfs_client *clp; member
8795 nfs4_setup_sequence(data->clp, in nfs4_get_lease_time_prepare()
8829 int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) in nfs4_proc_get_lease_time() argument
8838 .clp = clp, in nfs4_proc_get_lease_time()
8846 .rpc_client = clp->cl_rpcclient, in nfs4_proc_get_lease_time()
8968 session->clp->cl_exchange_flags |= EXCHGID4_FLAG_CONFIRMED_R; in nfs4_update_session()
8977 static int _nfs4_proc_create_session(struct nfs_client *clp, in _nfs4_proc_create_session() argument
8980 struct nfs4_session *session = clp->cl_session; in _nfs4_proc_create_session()
8982 .client = clp, in _nfs4_proc_create_session()
8983 .clientid = clp->cl_clientid, in _nfs4_proc_create_session()
8984 .seqid = clp->cl_seqid, in _nfs4_proc_create_session()
8997 nfs4_init_channel_attrs(&args, clp->cl_rpcclient); in _nfs4_proc_create_session()
9000 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, in _nfs4_proc_create_session()
9002 trace_nfs4_create_session(clp, status); in _nfs4_proc_create_session()
9013 clp->cl_seqid++; in _nfs4_proc_create_session()
9031 int nfs4_proc_create_session(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_create_session() argument
9035 struct nfs4_session *session = clp->cl_session; in nfs4_proc_create_session()
9037 dprintk("--> %s clp=%p session=%p\n", __func__, clp, session); in nfs4_proc_create_session()
9039 status = _nfs4_proc_create_session(clp, cred); in nfs4_proc_create_session()
9051 clp->cl_seqid, ptr[0], ptr[1], ptr[2], ptr[3]); in nfs4_proc_create_session()
9074 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, in nfs4_proc_destroy_session()
9076 trace_nfs4_destroy_session(session->clp, status); in nfs4_proc_destroy_session()
9088 struct nfs_client *clp; member
9096 struct nfs_client *clp = calldata->clp; in nfs41_sequence_release() local
9098 if (refcount_read(&clp->cl_count) > 1) in nfs41_sequence_release()
9099 nfs4_schedule_state_renewal(clp); in nfs41_sequence_release()
9100 nfs_put_client(clp); in nfs41_sequence_release()
9104 static int nfs41_sequence_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_sequence_handle_errors() argument
9111 nfs4_schedule_lease_recovery(clp); in nfs41_sequence_handle_errors()
9119 struct nfs_client *clp = calldata->clp; in nfs41_sequence_call_done() local
9124 trace_nfs4_sequence(clp, task->tk_status); in nfs41_sequence_call_done()
9127 if (refcount_read(&clp->cl_count) == 1) in nfs41_sequence_call_done()
9130 if (nfs41_sequence_handle_errors(task, clp) == -EAGAIN) { in nfs41_sequence_call_done()
9141 struct nfs_client *clp = calldata->clp; in nfs41_sequence_prepare() local
9148 nfs4_setup_sequence(clp, args, res, task); in nfs41_sequence_prepare()
9157 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, in _nfs41_proc_sequence() argument
9168 .rpc_client = clp->cl_rpcclient, in _nfs41_proc_sequence()
9176 if (!refcount_inc_not_zero(&clp->cl_count)) in _nfs41_proc_sequence()
9187 calldata->clp = clp; in _nfs41_proc_sequence()
9195 nfs_put_client(clp); in _nfs41_proc_sequence()
9201 static int nfs41_proc_async_sequence(struct nfs_client *clp, const struct cred *cred, unsigned rene… in nfs41_proc_async_sequence() argument
9208 task = _nfs41_proc_sequence(clp, cred, NULL, false); in nfs41_proc_async_sequence()
9217 static int nfs4_proc_sequence(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_sequence() argument
9222 task = _nfs41_proc_sequence(clp, cred, NULL, true); in nfs4_proc_sequence()
9237 struct nfs_client *clp; member
9246 nfs4_setup_sequence(calldata->clp, in nfs4_reclaim_complete_prepare()
9252 static int nfs41_reclaim_complete_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_reclaim_complete_handle_errors() argument
9256 wake_up_all(&clp->cl_lock_waitq); in nfs41_reclaim_complete_handle_errors()
9271 nfs4_schedule_lease_recovery(clp); in nfs41_reclaim_complete_handle_errors()
9279 struct nfs_client *clp = calldata->clp; in nfs4_reclaim_complete_done() local
9285 trace_nfs4_reclaim_complete(clp, task->tk_status); in nfs4_reclaim_complete_done()
9286 if (nfs41_reclaim_complete_handle_errors(task, clp) == -EAGAIN) { in nfs4_reclaim_complete_done()
9308 static int nfs41_proc_reclaim_complete(struct nfs_client *clp, in nfs41_proc_reclaim_complete() argument
9317 .rpc_client = clp->cl_rpcclient, in nfs41_proc_reclaim_complete()
9327 calldata->clp = clp; in nfs41_proc_reclaim_complete()
9528 nfs4_setup_sequence(lrp->clp, in nfs4_layoutreturn_prepare()
10063 struct nfs_client *clp = data->server->nfs_client; in nfs41_free_stateid_release() local
10065 nfs_put_client(clp); in nfs41_free_stateid_release()
10102 struct nfs_client *clp = server->nfs_client; in nfs41_free_stateid() local
10104 if (!refcount_inc_not_zero(&clp->cl_count)) in nfs41_free_stateid()