• Home
  • Raw
  • Download

Lines Matching refs:clp

106 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp,
476 struct nfs_client *clp = server->nfs_client; in nfs4_do_handle_exception() local
530 nfs4_schedule_lease_recovery(clp); in nfs4_do_handle_exception()
538 nfs4_schedule_lease_moved_recovery(clp); in nfs4_do_handle_exception()
598 struct nfs_client *clp = server->nfs_client; in nfs4_handle_exception() local
610 ret = nfs4_wait_clnt_recover(clp); in nfs4_handle_exception()
626 struct nfs_client *clp = server->nfs_client; in nfs4_async_handle_exception() local
637 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_exception()
638 if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) in nfs4_async_handle_exception()
639 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); in nfs4_async_handle_exception()
684 static bool _nfs4_is_integrity_protected(struct nfs_client *clp) in _nfs4_is_integrity_protected() argument
686 rpc_authflavor_t flavor = clp->cl_rpcclient->cl_auth->au_flavor; in _nfs4_is_integrity_protected()
690 static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp) in do_renew_lease() argument
692 spin_lock(&clp->cl_lock); in do_renew_lease()
693 if (time_before(clp->cl_last_renewal,timestamp)) in do_renew_lease()
694 clp->cl_last_renewal = timestamp; in do_renew_lease()
695 spin_unlock(&clp->cl_lock); in do_renew_lease()
700 struct nfs_client *clp = server->nfs_client; in renew_lease() local
702 if (!nfs4_has_session(clp)) in renew_lease()
703 do_renew_lease(clp, timestamp); in renew_lease()
781 nfs41_notify_server(session->clp); in nfs41_release_slot()
817 struct nfs_client *clp; in nfs41_sequence_process() local
828 clp = session->clp; in nfs41_sequence_process()
843 do_renew_lease(clp, res->sr_timestamp); in nfs41_sequence_process()
845 nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags, in nfs41_sequence_process()
898 nfs4_probe_sequence(clp, task->tk_msg.rpc_cred, slot); in nfs41_sequence_process()
1149 struct nfs_client *clp = server->nfs_client; in nfs4_do_call_sync() local
1158 .callback_ops = clp->cl_mvops->call_sync_ops, in nfs4_do_call_sync()
1576 struct nfs_client *clp = state->owner->so_server->nfs_client; in nfs_test_and_clear_all_open_stateid() local
1586 nfs4_state_mark_reclaim_nograce(clp, state); in nfs_test_and_clear_all_open_stateid()
1794 struct nfs_client *clp = server->nfs_client; in update_open_stateid() local
1836 nfs4_schedule_state_manager(clp); in update_open_stateid()
1926 struct nfs_client *clp = NFS_SERVER(state->inode)->nfs_client; in nfs4_opendata_check_deleg() local
1943 clp->cl_hostname); in nfs4_opendata_check_deleg()
2423 struct nfs_client *clp = sp->so_server->nfs_client; in nfs4_open_prepare() local
2445 data->o_arg.clientid = clp->cl_clientid; in nfs4_open_prepare()
2468 if (nfs4_has_persistent_session(clp)) in nfs4_open_prepare()
2470 else if (clp->cl_mvops->minor_version > 0) in nfs4_open_prepare()
5601 struct nfs_client *clp = data->client; in nfs4_renew_release() local
5603 if (refcount_read(&clp->cl_count) > 1) in nfs4_renew_release()
5604 nfs4_schedule_state_renewal(clp); in nfs4_renew_release()
5605 nfs_put_client(clp); in nfs4_renew_release()
5612 struct nfs_client *clp = data->client; in nfs4_renew_done() local
5615 trace_nfs4_renew_async(clp, task->tk_status); in nfs4_renew_done()
5620 nfs4_schedule_lease_moved_recovery(clp); in nfs4_renew_done()
5624 if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) == 0) in nfs4_renew_done()
5627 nfs4_schedule_lease_recovery(clp); in nfs4_renew_done()
5630 nfs4_schedule_path_down_recovery(clp); in nfs4_renew_done()
5632 do_renew_lease(clp, timestamp); in nfs4_renew_done()
5640 static int nfs4_proc_async_renew(struct nfs_client *clp, const struct cred *cred, unsigned renew_fl… in nfs4_proc_async_renew() argument
5644 .rpc_argp = clp, in nfs4_proc_async_renew()
5651 if (!refcount_inc_not_zero(&clp->cl_count)) in nfs4_proc_async_renew()
5655 nfs_put_client(clp); in nfs4_proc_async_renew()
5658 data->client = clp; in nfs4_proc_async_renew()
5660 return rpc_call_async(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT, in nfs4_proc_async_renew()
5664 static int nfs4_proc_renew(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_renew() argument
5668 .rpc_argp = clp, in nfs4_proc_renew()
5674 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_renew()
5677 do_renew_lease(clp, now); in nfs4_proc_renew()
6129 static void nfs4_init_boot_verifier(const struct nfs_client *clp, in nfs4_init_boot_verifier() argument
6134 if (test_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state)) { in nfs4_init_boot_verifier()
6140 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs4_init_boot_verifier()
6150 nfs4_get_uniquifier(struct nfs_client *clp, char *buf, size_t buflen) in nfs4_get_uniquifier() argument
6152 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs4_get_uniquifier()
6173 nfs4_init_nonuniform_client_string(struct nfs_client *clp) in nfs4_init_nonuniform_client_string() argument
6180 if (clp->cl_owner_id != NULL) in nfs4_init_nonuniform_client_string()
6185 strlen(clp->cl_rpcclient->cl_nodename) + in nfs4_init_nonuniform_client_string()
6187 strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)) + in nfs4_init_nonuniform_client_string()
6191 buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf)); in nfs4_init_nonuniform_client_string()
6210 clp->cl_rpcclient->cl_nodename, buf, in nfs4_init_nonuniform_client_string()
6211 rpc_peeraddr2str(clp->cl_rpcclient, in nfs4_init_nonuniform_client_string()
6215 clp->cl_rpcclient->cl_nodename, in nfs4_init_nonuniform_client_string()
6216 rpc_peeraddr2str(clp->cl_rpcclient, in nfs4_init_nonuniform_client_string()
6220 clp->cl_owner_id = str; in nfs4_init_nonuniform_client_string()
6225 nfs4_init_uniform_client_string(struct nfs_client *clp) in nfs4_init_uniform_client_string() argument
6232 if (clp->cl_owner_id != NULL) in nfs4_init_uniform_client_string()
6236 strlen(clp->cl_rpcclient->cl_nodename) + 1; in nfs4_init_uniform_client_string()
6238 buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf)); in nfs4_init_uniform_client_string()
6256 clp->rpc_ops->version, clp->cl_minorversion, in nfs4_init_uniform_client_string()
6257 buf, clp->cl_rpcclient->cl_nodename); in nfs4_init_uniform_client_string()
6260 clp->rpc_ops->version, clp->cl_minorversion, in nfs4_init_uniform_client_string()
6261 clp->cl_rpcclient->cl_nodename); in nfs4_init_uniform_client_string()
6262 clp->cl_owner_id = str; in nfs4_init_uniform_client_string()
6272 nfs4_init_callback_netid(const struct nfs_client *clp, char *buf, size_t len) in nfs4_init_callback_netid() argument
6274 if (strchr(clp->cl_ipaddr, ':') != NULL) in nfs4_init_callback_netid()
6302 int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, in nfs4_proc_setclientid() argument
6310 .sc_clnt = clp, in nfs4_proc_setclientid()
6319 .rpc_client = clp->cl_rpcclient, in nfs4_proc_setclientid()
6329 nfs4_init_boot_verifier(clp, &sc_verifier); in nfs4_proc_setclientid()
6331 if (test_bit(NFS_CS_MIGRATION, &clp->cl_flags)) in nfs4_proc_setclientid()
6332 status = nfs4_init_uniform_client_string(clp); in nfs4_proc_setclientid()
6334 status = nfs4_init_nonuniform_client_string(clp); in nfs4_proc_setclientid()
6341 nfs4_init_callback_netid(clp, in nfs4_proc_setclientid()
6346 clp->cl_ipaddr, port >> 8, port & 255); in nfs4_proc_setclientid()
6349 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid()
6350 clp->cl_owner_id); in nfs4_proc_setclientid()
6354 kfree(clp->cl_acceptor); in nfs4_proc_setclientid()
6355 clp->cl_acceptor = rpcauth_stringify_acceptor(setclientid.sc_cred); in nfs4_proc_setclientid()
6360 do_renew_lease(clp, now); in nfs4_proc_setclientid()
6362 trace_nfs4_setclientid(clp, status); in nfs4_proc_setclientid()
6375 int nfs4_proc_setclientid_confirm(struct nfs_client *clp, in nfs4_proc_setclientid_confirm() argument
6387 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid_confirm()
6388 clp->cl_clientid); in nfs4_proc_setclientid_confirm()
6389 status = rpc_call_sync(clp->cl_rpcclient, &msg, in nfs4_proc_setclientid_confirm()
6391 trace_nfs4_setclientid_confirm(clp, status); in nfs4_proc_setclientid_confirm()
6622 struct nfs_client *clp = server->nfs_client; in _nfs4_proc_getlk() local
6639 arg.lock_owner.clientid = clp->cl_clientid; in _nfs4_proc_getlk()
7352 struct nfs_client *clp = server->nfs_client; in nfs4_retry_setlk() local
7353 wait_queue_head_t *q = &clp->cl_lock_waitq; in nfs4_retry_setlk()
7354 struct nfs_lowner owner = { .clientid = clp->cl_clientid, in nfs4_retry_setlk()
7953 struct nfs_client *clp = server->nfs_client; in nfs4_proc_get_locations() local
7955 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_get_locations()
7964 clp->cl_hostname); in nfs4_proc_get_locations()
7986 struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; in _nfs40_proc_fsid_present() local
7990 .clientid = clp->cl_clientid, in _nfs40_proc_fsid_present()
8016 do_renew_lease(clp, now); in _nfs40_proc_fsid_present()
8079 struct nfs_client *clp = server->nfs_client; in nfs4_proc_fsid_present() local
8081 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_fsid_present()
8090 clp->cl_hostname); in nfs4_proc_fsid_present()
8113 struct nfs_client *clp = NFS_SERVER(dir)->nfs_client; in _nfs4_proc_secinfo() local
8134 .callback_ops = clp->cl_mvops->call_sync_ops, in _nfs4_proc_secinfo()
8141 clnt = clp->cl_rpcclient; in _nfs4_proc_secinfo()
8144 cred = nfs4_get_clid_cred(clp); in _nfs4_proc_secinfo()
8150 nfs4_state_protect(clp, NFS_SP4_MACH_CRED_SECINFO, &clnt, &msg); in _nfs4_proc_secinfo()
8226 struct nfs_client *clp = args->client; in nfs4_bind_one_conn_to_session_done() local
8231 nfs4_schedule_session_recovery(clp->cl_session, in nfs4_bind_one_conn_to_session_done()
8256 struct nfs_client *clp, in nfs4_proc_bind_one_conn_to_session() argument
8261 .client = clp, in nfs4_proc_bind_one_conn_to_session()
8282 nfs4_copy_sessionid(&args.sessionid, &clp->cl_session->sess_id); in nfs4_proc_bind_one_conn_to_session()
8283 if (!(clp->cl_session->flags & SESSION4_BACK_CHAN)) in nfs4_proc_bind_one_conn_to_session()
8296 trace_nfs4_bind_conn_to_session(clp, status); in nfs4_proc_bind_one_conn_to_session()
8299 clp->cl_session->sess_id.data, NFS4_MAX_SESSIONID_LEN)) { in nfs4_proc_bind_one_conn_to_session()
8319 struct nfs_client *clp; member
8330 return nfs4_proc_bind_one_conn_to_session(clnt, xprt, p->clp, p->cred); in nfs4_proc_bind_conn_to_session_callback()
8333 int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_bind_conn_to_session() argument
8336 .clp = clp, in nfs4_proc_bind_conn_to_session()
8339 return rpc_clnt_iterate_for_each_xprt(clp->cl_rpcclient, in nfs4_proc_bind_conn_to_session()
8377 static int nfs4_sp4_select_mode(struct nfs_client *clp, in nfs4_sp4_select_mode() argument
8468 clp->cl_sp4_flags = flags; in nfs4_sp4_select_mode()
8499 nfs4_run_exchange_id(struct nfs_client *clp, const struct cred *cred, in nfs4_run_exchange_id() argument
8507 .rpc_client = clp->cl_rpcclient, in nfs4_run_exchange_id()
8515 if (!refcount_inc_not_zero(&clp->cl_count)) in nfs4_run_exchange_id()
8523 nfs4_init_boot_verifier(clp, &calldata->args.verifier); in nfs4_run_exchange_id()
8525 status = nfs4_init_uniform_client_string(clp); in nfs4_run_exchange_id()
8562 memcpy(calldata->args.verifier.data, clp->cl_confirm.data, in nfs4_run_exchange_id()
8565 calldata->args.client = clp; in nfs4_run_exchange_id()
8586 nfs_put_client(clp); in nfs4_run_exchange_id()
8595 static int _nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred, in _nfs4_proc_exchange_id() argument
8604 task = nfs4_run_exchange_id(clp, cred, sp4_how, NULL); in _nfs4_proc_exchange_id()
8615 clp->cl_mvops->minor_version); in _nfs4_proc_exchange_id()
8619 status = nfs4_sp4_select_mode(clp, &resp->state_protect); in _nfs4_proc_exchange_id()
8623 do_renew_lease(clp, now); in _nfs4_proc_exchange_id()
8625 clp->cl_clientid = resp->clientid; in _nfs4_proc_exchange_id()
8626 clp->cl_exchange_flags = resp->flags; in _nfs4_proc_exchange_id()
8627 clp->cl_seqid = resp->seqid; in _nfs4_proc_exchange_id()
8631 &clp->cl_session->session_state); in _nfs4_proc_exchange_id()
8633 if (clp->cl_serverscope != NULL && in _nfs4_proc_exchange_id()
8634 !nfs41_same_server_scope(clp->cl_serverscope, in _nfs4_proc_exchange_id()
8638 set_bit(NFS4CLNT_SERVER_SCOPE_MISMATCH, &clp->cl_state); in _nfs4_proc_exchange_id()
8641 swap(clp->cl_serverowner, resp->server_owner); in _nfs4_proc_exchange_id()
8642 swap(clp->cl_serverscope, resp->server_scope); in _nfs4_proc_exchange_id()
8643 swap(clp->cl_implid, resp->impl_id); in _nfs4_proc_exchange_id()
8646 memcpy(clp->cl_confirm.data, argp->verifier.data, in _nfs4_proc_exchange_id()
8647 sizeof(clp->cl_confirm.data)); in _nfs4_proc_exchange_id()
8649 trace_nfs4_exchange_id(clp, status); in _nfs4_proc_exchange_id()
8666 int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_exchange_id() argument
8668 rpc_authflavor_t authflavor = clp->cl_rpcclient->cl_auth->au_flavor; in nfs4_proc_exchange_id()
8674 status = _nfs4_proc_exchange_id(clp, cred, SP4_MACH_CRED); in nfs4_proc_exchange_id()
8680 return _nfs4_proc_exchange_id(clp, cred, SP4_NONE); in nfs4_proc_exchange_id()
8710 sp4_how = (adata->clp->cl_sp4_flags == 0 ? SP4_NONE : SP4_MACH_CRED); in nfs4_test_session_trunk()
8713 task = nfs4_run_exchange_id(adata->clp, adata->cred, sp4_how, xprt); in nfs4_test_session_trunk()
8719 status = nfs4_detect_session_trunking(adata->clp, in nfs4_test_session_trunk()
8729 static int _nfs4_proc_destroy_clientid(struct nfs_client *clp, in _nfs4_proc_destroy_clientid() argument
8734 .rpc_argp = clp, in _nfs4_proc_destroy_clientid()
8739 status = rpc_call_sync(clp->cl_rpcclient, &msg, in _nfs4_proc_destroy_clientid()
8741 trace_nfs4_destroy_clientid(clp, status); in _nfs4_proc_destroy_clientid()
8744 "DESTROY_CLIENTID.", status, clp->cl_hostname); in _nfs4_proc_destroy_clientid()
8748 static int nfs4_proc_destroy_clientid(struct nfs_client *clp, in nfs4_proc_destroy_clientid() argument
8755 ret = _nfs4_proc_destroy_clientid(clp, cred); in nfs4_proc_destroy_clientid()
8768 int nfs4_destroy_clientid(struct nfs_client *clp) in nfs4_destroy_clientid() argument
8773 if (clp->cl_mvops->minor_version < 1) in nfs4_destroy_clientid()
8775 if (clp->cl_exchange_flags == 0) in nfs4_destroy_clientid()
8777 if (clp->cl_preserve_clid) in nfs4_destroy_clientid()
8779 cred = nfs4_get_clid_cred(clp); in nfs4_destroy_clientid()
8780 ret = nfs4_proc_destroy_clientid(clp, cred); in nfs4_destroy_clientid()
8785 clp->cl_exchange_flags = 0; in nfs4_destroy_clientid()
8796 struct nfs_client *clp; member
8808 nfs4_setup_sequence(data->clp, in nfs4_get_lease_time_prepare()
8846 int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) in nfs4_proc_get_lease_time() argument
8855 .clp = clp, in nfs4_proc_get_lease_time()
8863 .rpc_client = clp->cl_rpcclient, in nfs4_proc_get_lease_time()
8985 session->clp->cl_exchange_flags |= EXCHGID4_FLAG_CONFIRMED_R; in nfs4_update_session()
8994 static int _nfs4_proc_create_session(struct nfs_client *clp, in _nfs4_proc_create_session() argument
8997 struct nfs4_session *session = clp->cl_session; in _nfs4_proc_create_session()
8999 .client = clp, in _nfs4_proc_create_session()
9000 .clientid = clp->cl_clientid, in _nfs4_proc_create_session()
9001 .seqid = clp->cl_seqid, in _nfs4_proc_create_session()
9014 nfs4_init_channel_attrs(&args, clp->cl_rpcclient); in _nfs4_proc_create_session()
9017 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, in _nfs4_proc_create_session()
9019 trace_nfs4_create_session(clp, status); in _nfs4_proc_create_session()
9030 clp->cl_seqid++; in _nfs4_proc_create_session()
9048 int nfs4_proc_create_session(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_create_session() argument
9052 struct nfs4_session *session = clp->cl_session; in nfs4_proc_create_session()
9054 dprintk("--> %s clp=%p session=%p\n", __func__, clp, session); in nfs4_proc_create_session()
9056 status = _nfs4_proc_create_session(clp, cred); in nfs4_proc_create_session()
9068 clp->cl_seqid, ptr[0], ptr[1], ptr[2], ptr[3]); in nfs4_proc_create_session()
9094 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, in nfs4_proc_destroy_session()
9096 trace_nfs4_destroy_session(session->clp, status); in nfs4_proc_destroy_session()
9110 struct nfs_client *clp; member
9118 struct nfs_client *clp = calldata->clp; in nfs41_sequence_release() local
9120 if (refcount_read(&clp->cl_count) > 1) in nfs41_sequence_release()
9121 nfs4_schedule_state_renewal(clp); in nfs41_sequence_release()
9122 nfs_put_client(clp); in nfs41_sequence_release()
9126 static int nfs41_sequence_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_sequence_handle_errors() argument
9133 nfs4_schedule_lease_recovery(clp); in nfs41_sequence_handle_errors()
9141 struct nfs_client *clp = calldata->clp; in nfs41_sequence_call_done() local
9146 trace_nfs4_sequence(clp, task->tk_status); in nfs41_sequence_call_done()
9149 if (refcount_read(&clp->cl_count) == 1) in nfs41_sequence_call_done()
9152 if (nfs41_sequence_handle_errors(task, clp) == -EAGAIN) { in nfs41_sequence_call_done()
9165 struct nfs_client *clp = calldata->clp; in nfs41_sequence_prepare() local
9172 nfs4_setup_sequence(clp, args, res, task); in nfs41_sequence_prepare()
9181 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, in _nfs41_proc_sequence() argument
9192 .rpc_client = clp->cl_rpcclient, in _nfs41_proc_sequence()
9200 if (!refcount_inc_not_zero(&clp->cl_count)) in _nfs41_proc_sequence()
9211 calldata->clp = clp; in _nfs41_proc_sequence()
9219 nfs_put_client(clp); in _nfs41_proc_sequence()
9225 static int nfs41_proc_async_sequence(struct nfs_client *clp, const struct cred *cred, unsigned rene… in nfs41_proc_async_sequence() argument
9232 task = _nfs41_proc_sequence(clp, cred, NULL, false); in nfs41_proc_async_sequence()
9241 static int nfs4_proc_sequence(struct nfs_client *clp, const struct cred *cred) in nfs4_proc_sequence() argument
9246 task = _nfs41_proc_sequence(clp, cred, NULL, true); in nfs4_proc_sequence()
9261 struct nfs_client *clp; member
9270 nfs4_setup_sequence(calldata->clp, in nfs4_reclaim_complete_prepare()
9276 static int nfs41_reclaim_complete_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_reclaim_complete_handle_errors() argument
9280 wake_up_all(&clp->cl_lock_waitq); in nfs41_reclaim_complete_handle_errors()
9291 __func__, task->tk_status, clp->cl_hostname); in nfs41_reclaim_complete_handle_errors()
9298 nfs4_schedule_lease_recovery(clp); in nfs41_reclaim_complete_handle_errors()
9306 struct nfs_client *clp = calldata->clp; in nfs4_reclaim_complete_done() local
9313 trace_nfs4_reclaim_complete(clp, task->tk_status); in nfs4_reclaim_complete_done()
9314 if (nfs41_reclaim_complete_handle_errors(task, clp) == -EAGAIN) { in nfs4_reclaim_complete_done()
9337 static int nfs41_proc_reclaim_complete(struct nfs_client *clp, in nfs41_proc_reclaim_complete() argument
9346 .rpc_client = clp->cl_rpcclient, in nfs41_proc_reclaim_complete()
9357 calldata->clp = clp; in nfs41_proc_reclaim_complete()
9571 nfs4_setup_sequence(lrp->clp, in nfs4_layoutreturn_prepare()