Lines Matching refs:clp

350 	struct nfs_client *clp = server->nfs_client;  in nfs4_do_handle_exception()  local
382 nfs4_schedule_lease_recovery(clp); in nfs4_do_handle_exception()
390 nfs4_schedule_lease_moved_recovery(clp); in nfs4_do_handle_exception()
402 nfs4_schedule_session_recovery(clp->cl_session, errorcode); in nfs4_do_handle_exception()
448 struct nfs_client *clp = server->nfs_client; in nfs4_handle_exception() local
457 ret = nfs4_wait_clnt_recover(clp); in nfs4_handle_exception()
473 struct nfs_client *clp = server->nfs_client; in nfs4_async_handle_exception() local
482 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_exception()
483 if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) in nfs4_async_handle_exception()
484 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); in nfs4_async_handle_exception()
522 static bool _nfs4_is_integrity_protected(struct nfs_client *clp) in _nfs4_is_integrity_protected() argument
524 rpc_authflavor_t flavor = clp->cl_rpcclient->cl_auth->au_flavor; in _nfs4_is_integrity_protected()
533 static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp) in do_renew_lease() argument
535 spin_lock(&clp->cl_lock); in do_renew_lease()
536 if (time_before(clp->cl_last_renewal,timestamp)) in do_renew_lease()
537 clp->cl_last_renewal = timestamp; in do_renew_lease()
538 spin_unlock(&clp->cl_lock); in do_renew_lease()
543 struct nfs_client *clp = server->nfs_client; in renew_lease() local
545 if (!nfs4_has_session(clp)) in renew_lease()
546 do_renew_lease(clp, timestamp); in renew_lease()
662 nfs41_notify_server(session->clp); in nfs41_sequence_free_slot()
669 struct nfs_client *clp; in nfs41_sequence_done() local
692 clp = session->clp; in nfs41_sequence_done()
693 do_renew_lease(clp, res->sr_timestamp); in nfs41_sequence_done()
695 nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags); in nfs41_sequence_done()
855 __func__, session->clp, session, res->sr_slot ? in nfs4_setup_sequence()
932 struct nfs_client *clp = server->nfs_client; in nfs4_call_sync_sequence() local
941 .callback_ops = clp->cl_mvops->call_sync_ops, in nfs4_call_sync_sequence()
1281 struct nfs_client *clp = state->owner->so_server->nfs_client; in nfs_test_and_clear_all_open_stateid() local
1291 nfs4_state_mark_reclaim_nograce(clp, state); in nfs_test_and_clear_all_open_stateid()
1525 struct nfs_client *clp = NFS_SERVER(state->inode)->nfs_client; in nfs4_opendata_check_deleg() local
1542 clp->cl_hostname); in nfs4_opendata_check_deleg()
1967 struct nfs_client *clp = sp->so_server->nfs_client; in nfs4_open_prepare() local
1988 data->o_arg.clientid = clp->cl_clientid; in nfs4_open_prepare()
2011 if (nfs4_has_persistent_session(clp)) in nfs4_open_prepare()
2013 else if (clp->cl_mvops->minor_version > 0) in nfs4_open_prepare()
4205 struct nfs_client *clp = server->nfs_client; in nfs4_do_fsinfo() local
4207 spin_lock(&clp->cl_lock); in nfs4_do_fsinfo()
4208 clp->cl_lease_time = fsinfo->lease_time * HZ; in nfs4_do_fsinfo()
4209 clp->cl_last_renewal = now; in nfs4_do_fsinfo()
4210 spin_unlock(&clp->cl_lock); in nfs4_do_fsinfo()
4516 struct nfs_client *clp = data->client; in nfs4_renew_release() local
4518 if (atomic_read(&clp->cl_count) > 1) in nfs4_renew_release()
4519 nfs4_schedule_state_renewal(clp); in nfs4_renew_release()
4520 nfs_put_client(clp); in nfs4_renew_release()
4527 struct nfs_client *clp = data->client; in nfs4_renew_done() local
4530 trace_nfs4_renew_async(clp, task->tk_status); in nfs4_renew_done()
4535 nfs4_schedule_lease_moved_recovery(clp); in nfs4_renew_done()
4539 if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) == 0) in nfs4_renew_done()
4542 nfs4_schedule_lease_recovery(clp); in nfs4_renew_done()
4545 nfs4_schedule_path_down_recovery(clp); in nfs4_renew_done()
4547 do_renew_lease(clp, timestamp); in nfs4_renew_done()
4555 static int nfs4_proc_async_renew(struct nfs_client *clp, struct rpc_cred *cred, unsigned renew_flag… in nfs4_proc_async_renew() argument
4559 .rpc_argp = clp, in nfs4_proc_async_renew()
4566 if (!atomic_inc_not_zero(&clp->cl_count)) in nfs4_proc_async_renew()
4571 data->client = clp; in nfs4_proc_async_renew()
4573 return rpc_call_async(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT, in nfs4_proc_async_renew()
4577 static int nfs4_proc_renew(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_renew() argument
4581 .rpc_argp = clp, in nfs4_proc_renew()
4587 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_renew()
4590 do_renew_lease(clp, now); in nfs4_proc_renew()
5030 static void nfs4_init_boot_verifier(const struct nfs_client *clp, in nfs4_init_boot_verifier() argument
5035 if (test_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state)) { in nfs4_init_boot_verifier()
5041 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs4_init_boot_verifier()
5049 nfs4_init_nonuniform_client_string(struct nfs_client *clp) in nfs4_init_nonuniform_client_string() argument
5055 if (clp->cl_owner_id != NULL) in nfs4_init_nonuniform_client_string()
5059 len = 14 + strlen(clp->cl_ipaddr) + 1 + in nfs4_init_nonuniform_client_string()
5060 strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)) + in nfs4_init_nonuniform_client_string()
5062 strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_PROTO)) + in nfs4_init_nonuniform_client_string()
5080 clp->cl_ipaddr, in nfs4_init_nonuniform_client_string()
5081 rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR), in nfs4_init_nonuniform_client_string()
5082 rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_PROTO)); in nfs4_init_nonuniform_client_string()
5085 clp->cl_owner_id = str; in nfs4_init_nonuniform_client_string()
5090 nfs4_init_uniquifier_client_string(struct nfs_client *clp) in nfs4_init_uniquifier_client_string() argument
5098 strlen(clp->cl_rpcclient->cl_nodename) + 1; in nfs4_init_uniquifier_client_string()
5113 clp->rpc_ops->version, clp->cl_minorversion, in nfs4_init_uniquifier_client_string()
5115 clp->cl_rpcclient->cl_nodename); in nfs4_init_uniquifier_client_string()
5116 clp->cl_owner_id = str; in nfs4_init_uniquifier_client_string()
5121 nfs4_init_uniform_client_string(struct nfs_client *clp) in nfs4_init_uniform_client_string() argument
5127 if (clp->cl_owner_id != NULL) in nfs4_init_uniform_client_string()
5131 return nfs4_init_uniquifier_client_string(clp); in nfs4_init_uniform_client_string()
5134 strlen(clp->cl_rpcclient->cl_nodename) + 1; in nfs4_init_uniform_client_string()
5149 clp->rpc_ops->version, clp->cl_minorversion, in nfs4_init_uniform_client_string()
5150 clp->cl_rpcclient->cl_nodename); in nfs4_init_uniform_client_string()
5151 clp->cl_owner_id = str; in nfs4_init_uniform_client_string()
5161 nfs4_init_callback_netid(const struct nfs_client *clp, char *buf, size_t len) in nfs4_init_callback_netid() argument
5163 if (strchr(clp->cl_ipaddr, ':') != NULL) in nfs4_init_callback_netid()
5191 int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, in nfs4_proc_setclientid() argument
5199 .sc_clnt = clp, in nfs4_proc_setclientid()
5209 .rpc_client = clp->cl_rpcclient, in nfs4_proc_setclientid()
5218 nfs4_init_boot_verifier(clp, &sc_verifier); in nfs4_proc_setclientid()
5220 if (test_bit(NFS_CS_MIGRATION, &clp->cl_flags)) in nfs4_proc_setclientid()
5221 status = nfs4_init_uniform_client_string(clp); in nfs4_proc_setclientid()
5223 status = nfs4_init_nonuniform_client_string(clp); in nfs4_proc_setclientid()
5230 nfs4_init_callback_netid(clp, in nfs4_proc_setclientid()
5235 clp->cl_ipaddr, port >> 8, port & 255); in nfs4_proc_setclientid()
5238 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid()
5239 clp->cl_owner_id); in nfs4_proc_setclientid()
5247 clp->cl_acceptor = rpcauth_stringify_acceptor(setclientid.sc_cred); in nfs4_proc_setclientid()
5252 trace_nfs4_setclientid(clp, status); in nfs4_proc_setclientid()
5265 int nfs4_proc_setclientid_confirm(struct nfs_client *clp, in nfs4_proc_setclientid_confirm() argument
5277 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid_confirm()
5278 clp->cl_clientid); in nfs4_proc_setclientid_confirm()
5279 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_setclientid_confirm()
5280 trace_nfs4_setclientid_confirm(clp, status); in nfs4_proc_setclientid_confirm()
5461 struct nfs_client *clp = server->nfs_client; in _nfs4_proc_getlk() local
5478 arg.lock_owner.clientid = clp->cl_clientid; in _nfs4_proc_getlk()
6543 struct nfs_client *clp = server->nfs_client; in nfs4_proc_get_locations() local
6545 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_get_locations()
6552 clp->cl_hostname); in nfs4_proc_get_locations()
6574 struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; in _nfs40_proc_fsid_present() local
6578 .clientid = clp->cl_clientid, in _nfs40_proc_fsid_present()
6605 do_renew_lease(clp, now); in _nfs40_proc_fsid_present()
6669 struct nfs_client *clp = server->nfs_client; in nfs4_proc_fsid_present() local
6671 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_fsid_present()
6678 clp->cl_hostname); in nfs4_proc_fsid_present()
6801 int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_bind_conn_to_session() argument
6805 .client = clp, in nfs4_proc_bind_conn_to_session()
6819 nfs4_copy_sessionid(&args.sessionid, &clp->cl_session->sess_id); in nfs4_proc_bind_conn_to_session()
6820 if (!(clp->cl_session->flags & SESSION4_BACK_CHAN)) in nfs4_proc_bind_conn_to_session()
6823 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_bind_conn_to_session()
6824 trace_nfs4_bind_conn_to_session(clp, status); in nfs4_proc_bind_conn_to_session()
6827 clp->cl_session->sess_id.data, NFS4_MAX_SESSIONID_LEN)) { in nfs4_proc_bind_conn_to_session()
6881 static int nfs4_sp4_select_mode(struct nfs_client *clp, in nfs4_sp4_select_mode() argument
6926 set_bit(NFS_SP4_MACH_CRED_MINIMAL, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6935 set_bit(NFS_SP4_MACH_CRED_CLEANUP, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6941 set_bit(NFS_SP4_MACH_CRED_SECINFO, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6947 set_bit(NFS_SP4_MACH_CRED_STATEID, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6952 set_bit(NFS_SP4_MACH_CRED_WRITE, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6957 set_bit(NFS_SP4_MACH_CRED_COMMIT, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6969 static int _nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred, in _nfs4_proc_exchange_id() argument
6975 .client = clp, in _nfs4_proc_exchange_id()
6996 nfs4_init_boot_verifier(clp, &verifier); in _nfs4_proc_exchange_id()
6998 status = nfs4_init_uniform_client_string(clp); in _nfs4_proc_exchange_id()
7003 clp->cl_rpcclient->cl_auth->au_ops->au_name, in _nfs4_proc_exchange_id()
7004 clp->cl_owner_id); in _nfs4_proc_exchange_id()
7042 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in _nfs4_proc_exchange_id()
7043 trace_nfs4_exchange_id(clp, status); in _nfs4_proc_exchange_id()
7048 status = nfs4_sp4_select_mode(clp, &res.state_protect); in _nfs4_proc_exchange_id()
7051 clp->cl_clientid = res.clientid; in _nfs4_proc_exchange_id()
7052 clp->cl_exchange_flags = res.flags; in _nfs4_proc_exchange_id()
7056 &clp->cl_session->session_state); in _nfs4_proc_exchange_id()
7057 clp->cl_seqid = res.seqid; in _nfs4_proc_exchange_id()
7060 kfree(clp->cl_serverowner); in _nfs4_proc_exchange_id()
7061 clp->cl_serverowner = res.server_owner; in _nfs4_proc_exchange_id()
7065 kfree(clp->cl_implid); in _nfs4_proc_exchange_id()
7066 clp->cl_implid = res.impl_id; in _nfs4_proc_exchange_id()
7069 if (clp->cl_serverscope != NULL && in _nfs4_proc_exchange_id()
7070 !nfs41_same_server_scope(clp->cl_serverscope, in _nfs4_proc_exchange_id()
7074 set_bit(NFS4CLNT_SERVER_SCOPE_MISMATCH, &clp->cl_state); in _nfs4_proc_exchange_id()
7075 kfree(clp->cl_serverscope); in _nfs4_proc_exchange_id()
7076 clp->cl_serverscope = NULL; in _nfs4_proc_exchange_id()
7079 if (clp->cl_serverscope == NULL) { in _nfs4_proc_exchange_id()
7080 clp->cl_serverscope = res.server_scope; in _nfs4_proc_exchange_id()
7092 if (clp->cl_implid != NULL) in _nfs4_proc_exchange_id()
7095 clp->cl_implid->domain, clp->cl_implid->name, in _nfs4_proc_exchange_id()
7096 clp->cl_implid->date.seconds, in _nfs4_proc_exchange_id()
7097 clp->cl_implid->date.nseconds); in _nfs4_proc_exchange_id()
7114 int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_exchange_id() argument
7116 rpc_authflavor_t authflavor = clp->cl_rpcclient->cl_auth->au_flavor; in nfs4_proc_exchange_id()
7122 status = _nfs4_proc_exchange_id(clp, cred, SP4_MACH_CRED); in nfs4_proc_exchange_id()
7128 return _nfs4_proc_exchange_id(clp, cred, SP4_NONE); in nfs4_proc_exchange_id()
7131 static int _nfs4_proc_destroy_clientid(struct nfs_client *clp, in _nfs4_proc_destroy_clientid() argument
7136 .rpc_argp = clp, in _nfs4_proc_destroy_clientid()
7141 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in _nfs4_proc_destroy_clientid()
7142 trace_nfs4_destroy_clientid(clp, status); in _nfs4_proc_destroy_clientid()
7145 "DESTROY_CLIENTID.", status, clp->cl_hostname); in _nfs4_proc_destroy_clientid()
7149 static int nfs4_proc_destroy_clientid(struct nfs_client *clp, in nfs4_proc_destroy_clientid() argument
7156 ret = _nfs4_proc_destroy_clientid(clp, cred); in nfs4_proc_destroy_clientid()
7169 int nfs4_destroy_clientid(struct nfs_client *clp) in nfs4_destroy_clientid() argument
7174 if (clp->cl_mvops->minor_version < 1) in nfs4_destroy_clientid()
7176 if (clp->cl_exchange_flags == 0) in nfs4_destroy_clientid()
7178 if (clp->cl_preserve_clid) in nfs4_destroy_clientid()
7180 cred = nfs4_get_clid_cred(clp); in nfs4_destroy_clientid()
7181 ret = nfs4_proc_destroy_clientid(clp, cred); in nfs4_destroy_clientid()
7187 clp->cl_exchange_flags = 0; in nfs4_destroy_clientid()
7196 struct nfs_client *clp; member
7208 nfs41_setup_sequence(data->clp->cl_session, in nfs4_get_lease_time_prepare()
7246 int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) in nfs4_proc_get_lease_time() argument
7256 .clp = clp, in nfs4_proc_get_lease_time()
7264 .rpc_client = clp->cl_rpcclient, in nfs4_proc_get_lease_time()
7393 session->clp->cl_exchange_flags |= EXCHGID4_FLAG_CONFIRMED_R; in nfs4_update_session()
7402 static int _nfs4_proc_create_session(struct nfs_client *clp, in _nfs4_proc_create_session() argument
7405 struct nfs4_session *session = clp->cl_session; in _nfs4_proc_create_session()
7407 .client = clp, in _nfs4_proc_create_session()
7408 .clientid = clp->cl_clientid, in _nfs4_proc_create_session()
7409 .seqid = clp->cl_seqid, in _nfs4_proc_create_session()
7425 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in _nfs4_proc_create_session()
7426 trace_nfs4_create_session(clp, status); in _nfs4_proc_create_session()
7432 if (clp->cl_seqid == res.seqid) in _nfs4_proc_create_session()
7433 clp->cl_seqid++; in _nfs4_proc_create_session()
7447 int nfs4_proc_create_session(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_create_session() argument
7451 struct nfs4_session *session = clp->cl_session; in nfs4_proc_create_session()
7453 dprintk("--> %s clp=%p session=%p\n", __func__, clp, session); in nfs4_proc_create_session()
7455 status = _nfs4_proc_create_session(clp, cred); in nfs4_proc_create_session()
7467 clp->cl_seqid, ptr[0], ptr[1], ptr[2], ptr[3]); in nfs4_proc_create_session()
7493 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_destroy_session()
7494 trace_nfs4_destroy_session(session->clp, status); in nfs4_proc_destroy_session()
7508 struct nfs_client *clp; member
7516 struct nfs_client *clp = calldata->clp; in nfs41_sequence_release() local
7518 if (atomic_read(&clp->cl_count) > 1) in nfs41_sequence_release()
7519 nfs4_schedule_state_renewal(clp); in nfs41_sequence_release()
7520 nfs_put_client(clp); in nfs41_sequence_release()
7524 static int nfs41_sequence_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_sequence_handle_errors() argument
7531 nfs4_schedule_lease_recovery(clp); in nfs41_sequence_handle_errors()
7539 struct nfs_client *clp = calldata->clp; in nfs41_sequence_call_done() local
7544 trace_nfs4_sequence(clp, task->tk_status); in nfs41_sequence_call_done()
7547 if (atomic_read(&clp->cl_count) == 1) in nfs41_sequence_call_done()
7550 if (nfs41_sequence_handle_errors(task, clp) == -EAGAIN) { in nfs41_sequence_call_done()
7563 struct nfs_client *clp = calldata->clp; in nfs41_sequence_prepare() local
7570 nfs41_setup_sequence(clp->cl_session, args, res, task); in nfs41_sequence_prepare()
7579 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, in _nfs41_proc_sequence() argument
7589 .rpc_client = clp->cl_rpcclient, in _nfs41_proc_sequence()
7595 if (!atomic_inc_not_zero(&clp->cl_count)) in _nfs41_proc_sequence()
7599 nfs_put_client(clp); in _nfs41_proc_sequence()
7607 calldata->clp = clp; in _nfs41_proc_sequence()
7613 static int nfs41_proc_async_sequence(struct nfs_client *clp, struct rpc_cred *cred, unsigned renew_… in nfs41_proc_async_sequence() argument
7620 task = _nfs41_proc_sequence(clp, cred, false); in nfs41_proc_async_sequence()
7629 static int nfs4_proc_sequence(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_sequence() argument
7634 task = _nfs41_proc_sequence(clp, cred, true); in nfs4_proc_sequence()
7649 struct nfs_client *clp; member
7658 nfs41_setup_sequence(calldata->clp->cl_session, in nfs4_reclaim_complete_prepare()
7664 static int nfs41_reclaim_complete_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_reclaim_complete_handle_errors() argument
7677 nfs4_schedule_lease_recovery(clp); in nfs41_reclaim_complete_handle_errors()
7685 struct nfs_client *clp = calldata->clp; in nfs4_reclaim_complete_done() local
7692 trace_nfs4_reclaim_complete(clp, task->tk_status); in nfs4_reclaim_complete_done()
7693 if (nfs41_reclaim_complete_handle_errors(task, clp) == -EAGAIN) { in nfs4_reclaim_complete_done()
7716 static int nfs41_proc_reclaim_complete(struct nfs_client *clp, in nfs41_proc_reclaim_complete() argument
7726 .rpc_client = clp->cl_rpcclient, in nfs41_proc_reclaim_complete()
7737 calldata->clp = clp; in nfs41_proc_reclaim_complete()
8014 nfs41_setup_sequence(lrp->clp->cl_session, in nfs4_layoutreturn_prepare()