Lines Matching refs:clp
349 struct nfs_client *clp = server->nfs_client; in nfs4_handle_exception() local
387 nfs4_schedule_lease_recovery(clp); in nfs4_handle_exception()
395 nfs4_schedule_lease_moved_recovery(clp); in nfs4_handle_exception()
407 nfs4_schedule_session_recovery(clp->cl_session, errorcode); in nfs4_handle_exception()
443 ret = nfs4_wait_clnt_recover(clp); in nfs4_handle_exception()
455 static bool _nfs4_is_integrity_protected(struct nfs_client *clp) in _nfs4_is_integrity_protected() argument
457 rpc_authflavor_t flavor = clp->cl_rpcclient->cl_auth->au_flavor; in _nfs4_is_integrity_protected()
466 static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp) in do_renew_lease() argument
468 spin_lock(&clp->cl_lock); in do_renew_lease()
469 if (time_before(clp->cl_last_renewal,timestamp)) in do_renew_lease()
470 clp->cl_last_renewal = timestamp; in do_renew_lease()
471 spin_unlock(&clp->cl_lock); in do_renew_lease()
592 nfs41_server_notify_highest_slotid_update(session->clp); in nfs41_sequence_free_slot()
599 struct nfs_client *clp; in nfs41_sequence_done() local
622 clp = session->clp; in nfs41_sequence_done()
623 do_renew_lease(clp, res->sr_timestamp); in nfs41_sequence_done()
626 nfs4_schedule_lease_recovery(clp); in nfs41_sequence_done()
786 __func__, session->clp, session, res->sr_slot ? in nfs4_setup_sequence()
863 struct nfs_client *clp = server->nfs_client; in nfs4_call_sync_sequence() local
872 .callback_ops = clp->cl_mvops->call_sync_ops, in nfs4_call_sync_sequence()
1180 struct nfs_client *clp = state->owner->so_server->nfs_client; in nfs_test_and_clear_all_open_stateid() local
1190 nfs4_state_mark_reclaim_nograce(clp, state); in nfs_test_and_clear_all_open_stateid()
1423 struct nfs_client *clp = NFS_SERVER(state->inode)->nfs_client; in nfs4_opendata_check_deleg() local
1436 clp->cl_hostname); in nfs4_opendata_check_deleg()
1848 struct nfs_client *clp = sp->so_server->nfs_client; in nfs4_open_prepare() local
1870 data->o_arg.clientid = clp->cl_clientid; in nfs4_open_prepare()
1891 if (nfs4_has_persistent_session(clp)) in nfs4_open_prepare()
1893 else if (clp->cl_mvops->minor_version > 0) in nfs4_open_prepare()
4051 struct nfs_client *clp = server->nfs_client; in nfs4_do_fsinfo() local
4053 spin_lock(&clp->cl_lock); in nfs4_do_fsinfo()
4054 clp->cl_lease_time = fsinfo->lease_time * HZ; in nfs4_do_fsinfo()
4055 clp->cl_last_renewal = now; in nfs4_do_fsinfo()
4056 spin_unlock(&clp->cl_lock); in nfs4_do_fsinfo()
4362 struct nfs_client *clp = data->client; in nfs4_renew_release() local
4364 if (atomic_read(&clp->cl_count) > 1) in nfs4_renew_release()
4365 nfs4_schedule_state_renewal(clp); in nfs4_renew_release()
4366 nfs_put_client(clp); in nfs4_renew_release()
4373 struct nfs_client *clp = data->client; in nfs4_renew_done() local
4376 trace_nfs4_renew_async(clp, task->tk_status); in nfs4_renew_done()
4381 nfs4_schedule_lease_moved_recovery(clp); in nfs4_renew_done()
4385 if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) == 0) in nfs4_renew_done()
4388 nfs4_schedule_lease_recovery(clp); in nfs4_renew_done()
4391 nfs4_schedule_path_down_recovery(clp); in nfs4_renew_done()
4393 do_renew_lease(clp, timestamp); in nfs4_renew_done()
4401 static int nfs4_proc_async_renew(struct nfs_client *clp, struct rpc_cred *cred, unsigned renew_flag… in nfs4_proc_async_renew() argument
4405 .rpc_argp = clp, in nfs4_proc_async_renew()
4412 if (!atomic_inc_not_zero(&clp->cl_count)) in nfs4_proc_async_renew()
4417 data->client = clp; in nfs4_proc_async_renew()
4419 return rpc_call_async(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT, in nfs4_proc_async_renew()
4423 static int nfs4_proc_renew(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_renew() argument
4427 .rpc_argp = clp, in nfs4_proc_renew()
4433 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_renew()
4436 do_renew_lease(clp, now); in nfs4_proc_renew()
4881 struct nfs_client *clp = server->nfs_client; in nfs4_async_handle_error() local
4902 nfs4_schedule_lease_recovery(clp); in nfs4_async_handle_error()
4909 nfs4_schedule_lease_moved_recovery(clp); in nfs4_async_handle_error()
4921 nfs4_schedule_session_recovery(clp->cl_session, task->tk_status); in nfs4_async_handle_error()
4940 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_error()
4941 if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) in nfs4_async_handle_error()
4942 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); in nfs4_async_handle_error()
4950 static void nfs4_init_boot_verifier(const struct nfs_client *clp, in nfs4_init_boot_verifier() argument
4955 if (test_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state)) { in nfs4_init_boot_verifier()
4961 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs4_init_boot_verifier()
4969 nfs4_init_nonuniform_client_string(struct nfs_client *clp, in nfs4_init_nonuniform_client_string() argument
4974 if (clp->cl_owner_id != NULL) in nfs4_init_nonuniform_client_string()
4975 return strlcpy(buf, clp->cl_owner_id, len); in nfs4_init_nonuniform_client_string()
4979 clp->cl_ipaddr, in nfs4_init_nonuniform_client_string()
4980 rpc_peeraddr2str(clp->cl_rpcclient, in nfs4_init_nonuniform_client_string()
4982 rpc_peeraddr2str(clp->cl_rpcclient, in nfs4_init_nonuniform_client_string()
4985 clp->cl_owner_id = kstrdup(buf, GFP_KERNEL); in nfs4_init_nonuniform_client_string()
4990 nfs4_init_uniform_client_string(struct nfs_client *clp, in nfs4_init_uniform_client_string() argument
4993 const char *nodename = clp->cl_rpcclient->cl_nodename; in nfs4_init_uniform_client_string()
4996 if (clp->cl_owner_id != NULL) in nfs4_init_uniform_client_string()
4997 return strlcpy(buf, clp->cl_owner_id, len); in nfs4_init_uniform_client_string()
5001 clp->rpc_ops->version, in nfs4_init_uniform_client_string()
5002 clp->cl_minorversion, in nfs4_init_uniform_client_string()
5007 clp->rpc_ops->version, clp->cl_minorversion, in nfs4_init_uniform_client_string()
5009 clp->cl_owner_id = kstrdup(buf, GFP_KERNEL); in nfs4_init_uniform_client_string()
5019 nfs4_init_callback_netid(const struct nfs_client *clp, char *buf, size_t len) in nfs4_init_callback_netid() argument
5021 if (strchr(clp->cl_ipaddr, ':') != NULL) in nfs4_init_callback_netid()
5049 int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, in nfs4_proc_setclientid() argument
5057 .sc_cb_ident = clp->cl_cb_ident, in nfs4_proc_setclientid()
5067 .rpc_client = clp->cl_rpcclient, in nfs4_proc_setclientid()
5076 nfs4_init_boot_verifier(clp, &sc_verifier); in nfs4_proc_setclientid()
5077 if (test_bit(NFS_CS_MIGRATION, &clp->cl_flags)) in nfs4_proc_setclientid()
5079 nfs4_init_uniform_client_string(clp, in nfs4_proc_setclientid()
5084 nfs4_init_nonuniform_client_string(clp, in nfs4_proc_setclientid()
5089 nfs4_init_callback_netid(clp, in nfs4_proc_setclientid()
5094 clp->cl_ipaddr, port >> 8, port & 255); in nfs4_proc_setclientid()
5097 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid()
5106 clp->cl_acceptor = rpcauth_stringify_acceptor(setclientid.sc_cred); in nfs4_proc_setclientid()
5111 trace_nfs4_setclientid(clp, status); in nfs4_proc_setclientid()
5124 int nfs4_proc_setclientid_confirm(struct nfs_client *clp, in nfs4_proc_setclientid_confirm() argument
5136 clp->cl_rpcclient->cl_auth->au_ops->au_name, in nfs4_proc_setclientid_confirm()
5137 clp->cl_clientid); in nfs4_proc_setclientid_confirm()
5138 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_setclientid_confirm()
5139 trace_nfs4_setclientid_confirm(clp, status); in nfs4_proc_setclientid_confirm()
5318 struct nfs_client *clp = server->nfs_client; in _nfs4_proc_getlk() local
5335 arg.lock_owner.clientid = clp->cl_clientid; in _nfs4_proc_getlk()
6405 struct nfs_client *clp = server->nfs_client; in nfs4_proc_get_locations() local
6407 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_get_locations()
6414 clp->cl_hostname); in nfs4_proc_get_locations()
6436 struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; in _nfs40_proc_fsid_present() local
6440 .clientid = clp->cl_clientid, in _nfs40_proc_fsid_present()
6467 do_renew_lease(clp, now); in _nfs40_proc_fsid_present()
6531 struct nfs_client *clp = server->nfs_client; in nfs4_proc_fsid_present() local
6533 clp->cl_mvops->mig_recovery_ops; in nfs4_proc_fsid_present()
6540 clp->cl_hostname); in nfs4_proc_fsid_present()
6663 int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_bind_conn_to_session() argument
6667 .client = clp, in nfs4_proc_bind_conn_to_session()
6681 nfs4_copy_sessionid(&args.sessionid, &clp->cl_session->sess_id); in nfs4_proc_bind_conn_to_session()
6682 if (!(clp->cl_session->flags & SESSION4_BACK_CHAN)) in nfs4_proc_bind_conn_to_session()
6685 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_bind_conn_to_session()
6686 trace_nfs4_bind_conn_to_session(clp, status); in nfs4_proc_bind_conn_to_session()
6689 clp->cl_session->sess_id.data, NFS4_MAX_SESSIONID_LEN)) { in nfs4_proc_bind_conn_to_session()
6743 static int nfs4_sp4_select_mode(struct nfs_client *clp, in nfs4_sp4_select_mode() argument
6788 set_bit(NFS_SP4_MACH_CRED_MINIMAL, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6797 set_bit(NFS_SP4_MACH_CRED_CLEANUP, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6803 set_bit(NFS_SP4_MACH_CRED_SECINFO, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6809 set_bit(NFS_SP4_MACH_CRED_STATEID, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6814 set_bit(NFS_SP4_MACH_CRED_WRITE, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6819 set_bit(NFS_SP4_MACH_CRED_COMMIT, &clp->cl_sp4_flags); in nfs4_sp4_select_mode()
6831 static int _nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred, in _nfs4_proc_exchange_id() argument
6837 .client = clp, in _nfs4_proc_exchange_id()
6858 nfs4_init_boot_verifier(clp, &verifier); in _nfs4_proc_exchange_id()
6859 args.id_len = nfs4_init_uniform_client_string(clp, args.id, in _nfs4_proc_exchange_id()
6862 clp->cl_rpcclient->cl_auth->au_ops->au_name, in _nfs4_proc_exchange_id()
6901 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in _nfs4_proc_exchange_id()
6902 trace_nfs4_exchange_id(clp, status); in _nfs4_proc_exchange_id()
6907 status = nfs4_sp4_select_mode(clp, &res.state_protect); in _nfs4_proc_exchange_id()
6910 clp->cl_clientid = res.clientid; in _nfs4_proc_exchange_id()
6911 clp->cl_exchange_flags = res.flags; in _nfs4_proc_exchange_id()
6915 &clp->cl_session->session_state); in _nfs4_proc_exchange_id()
6916 clp->cl_seqid = res.seqid; in _nfs4_proc_exchange_id()
6919 kfree(clp->cl_serverowner); in _nfs4_proc_exchange_id()
6920 clp->cl_serverowner = res.server_owner; in _nfs4_proc_exchange_id()
6924 kfree(clp->cl_implid); in _nfs4_proc_exchange_id()
6925 clp->cl_implid = res.impl_id; in _nfs4_proc_exchange_id()
6927 if (clp->cl_serverscope != NULL && in _nfs4_proc_exchange_id()
6928 !nfs41_same_server_scope(clp->cl_serverscope, in _nfs4_proc_exchange_id()
6932 set_bit(NFS4CLNT_SERVER_SCOPE_MISMATCH, &clp->cl_state); in _nfs4_proc_exchange_id()
6933 kfree(clp->cl_serverscope); in _nfs4_proc_exchange_id()
6934 clp->cl_serverscope = NULL; in _nfs4_proc_exchange_id()
6937 if (clp->cl_serverscope == NULL) { in _nfs4_proc_exchange_id()
6938 clp->cl_serverscope = res.server_scope; in _nfs4_proc_exchange_id()
6949 if (clp->cl_implid != NULL) in _nfs4_proc_exchange_id()
6952 clp->cl_implid->domain, clp->cl_implid->name, in _nfs4_proc_exchange_id()
6953 clp->cl_implid->date.seconds, in _nfs4_proc_exchange_id()
6954 clp->cl_implid->date.nseconds); in _nfs4_proc_exchange_id()
6971 int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_exchange_id() argument
6973 rpc_authflavor_t authflavor = clp->cl_rpcclient->cl_auth->au_flavor; in nfs4_proc_exchange_id()
6979 status = _nfs4_proc_exchange_id(clp, cred, SP4_MACH_CRED); in nfs4_proc_exchange_id()
6985 return _nfs4_proc_exchange_id(clp, cred, SP4_NONE); in nfs4_proc_exchange_id()
6988 static int _nfs4_proc_destroy_clientid(struct nfs_client *clp, in _nfs4_proc_destroy_clientid() argument
6993 .rpc_argp = clp, in _nfs4_proc_destroy_clientid()
6998 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in _nfs4_proc_destroy_clientid()
6999 trace_nfs4_destroy_clientid(clp, status); in _nfs4_proc_destroy_clientid()
7002 "DESTROY_CLIENTID.", status, clp->cl_hostname); in _nfs4_proc_destroy_clientid()
7006 static int nfs4_proc_destroy_clientid(struct nfs_client *clp, in nfs4_proc_destroy_clientid() argument
7013 ret = _nfs4_proc_destroy_clientid(clp, cred); in nfs4_proc_destroy_clientid()
7026 int nfs4_destroy_clientid(struct nfs_client *clp) in nfs4_destroy_clientid() argument
7031 if (clp->cl_mvops->minor_version < 1) in nfs4_destroy_clientid()
7033 if (clp->cl_exchange_flags == 0) in nfs4_destroy_clientid()
7035 if (clp->cl_preserve_clid) in nfs4_destroy_clientid()
7037 cred = nfs4_get_clid_cred(clp); in nfs4_destroy_clientid()
7038 ret = nfs4_proc_destroy_clientid(clp, cred); in nfs4_destroy_clientid()
7044 clp->cl_exchange_flags = 0; in nfs4_destroy_clientid()
7053 struct nfs_client *clp; member
7065 nfs41_setup_sequence(data->clp->cl_session, in nfs4_get_lease_time_prepare()
7103 int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) in nfs4_proc_get_lease_time() argument
7113 .clp = clp, in nfs4_proc_get_lease_time()
7121 .rpc_client = clp->cl_rpcclient, in nfs4_proc_get_lease_time()
7250 session->clp->cl_exchange_flags |= EXCHGID4_FLAG_CONFIRMED_R; in nfs4_update_session()
7259 static int _nfs4_proc_create_session(struct nfs_client *clp, in _nfs4_proc_create_session() argument
7262 struct nfs4_session *session = clp->cl_session; in _nfs4_proc_create_session()
7264 .client = clp, in _nfs4_proc_create_session()
7265 .clientid = clp->cl_clientid, in _nfs4_proc_create_session()
7266 .seqid = clp->cl_seqid, in _nfs4_proc_create_session()
7282 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in _nfs4_proc_create_session()
7283 trace_nfs4_create_session(clp, status); in _nfs4_proc_create_session()
7289 if (clp->cl_seqid == res.seqid) in _nfs4_proc_create_session()
7290 clp->cl_seqid++; in _nfs4_proc_create_session()
7304 int nfs4_proc_create_session(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_create_session() argument
7308 struct nfs4_session *session = clp->cl_session; in nfs4_proc_create_session()
7310 dprintk("--> %s clp=%p session=%p\n", __func__, clp, session); in nfs4_proc_create_session()
7312 status = _nfs4_proc_create_session(clp, cred); in nfs4_proc_create_session()
7324 clp->cl_seqid, ptr[0], ptr[1], ptr[2], ptr[3]); in nfs4_proc_create_session()
7350 status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); in nfs4_proc_destroy_session()
7351 trace_nfs4_destroy_session(session->clp, status); in nfs4_proc_destroy_session()
7365 struct nfs_client *clp; member
7373 struct nfs_client *clp = calldata->clp; in nfs41_sequence_release() local
7375 if (atomic_read(&clp->cl_count) > 1) in nfs41_sequence_release()
7376 nfs4_schedule_state_renewal(clp); in nfs41_sequence_release()
7377 nfs_put_client(clp); in nfs41_sequence_release()
7381 static int nfs41_sequence_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_sequence_handle_errors() argument
7388 nfs4_schedule_lease_recovery(clp); in nfs41_sequence_handle_errors()
7396 struct nfs_client *clp = calldata->clp; in nfs41_sequence_call_done() local
7401 trace_nfs4_sequence(clp, task->tk_status); in nfs41_sequence_call_done()
7404 if (atomic_read(&clp->cl_count) == 1) in nfs41_sequence_call_done()
7407 if (nfs41_sequence_handle_errors(task, clp) == -EAGAIN) { in nfs41_sequence_call_done()
7420 struct nfs_client *clp = calldata->clp; in nfs41_sequence_prepare() local
7427 nfs41_setup_sequence(clp->cl_session, args, res, task); in nfs41_sequence_prepare()
7436 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, in _nfs41_proc_sequence() argument
7446 .rpc_client = clp->cl_rpcclient, in _nfs41_proc_sequence()
7452 if (!atomic_inc_not_zero(&clp->cl_count)) in _nfs41_proc_sequence()
7456 nfs_put_client(clp); in _nfs41_proc_sequence()
7464 calldata->clp = clp; in _nfs41_proc_sequence()
7470 static int nfs41_proc_async_sequence(struct nfs_client *clp, struct rpc_cred *cred, unsigned renew_… in nfs41_proc_async_sequence() argument
7477 task = _nfs41_proc_sequence(clp, cred, false); in nfs41_proc_async_sequence()
7486 static int nfs4_proc_sequence(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_proc_sequence() argument
7491 task = _nfs41_proc_sequence(clp, cred, true); in nfs4_proc_sequence()
7501 nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags); in nfs4_proc_sequence()
7511 struct nfs_client *clp; member
7520 nfs41_setup_sequence(calldata->clp->cl_session, in nfs4_reclaim_complete_prepare()
7526 static int nfs41_reclaim_complete_handle_errors(struct rpc_task *task, struct nfs_client *clp) in nfs41_reclaim_complete_handle_errors() argument
7539 nfs4_schedule_lease_recovery(clp); in nfs41_reclaim_complete_handle_errors()
7547 struct nfs_client *clp = calldata->clp; in nfs4_reclaim_complete_done() local
7554 trace_nfs4_reclaim_complete(clp, task->tk_status); in nfs4_reclaim_complete_done()
7555 if (nfs41_reclaim_complete_handle_errors(task, clp) == -EAGAIN) { in nfs4_reclaim_complete_done()
7578 static int nfs41_proc_reclaim_complete(struct nfs_client *clp, in nfs41_proc_reclaim_complete() argument
7588 .rpc_client = clp->cl_rpcclient, in nfs41_proc_reclaim_complete()
7599 calldata->clp = clp; in nfs41_proc_reclaim_complete()
7856 nfs41_setup_sequence(lrp->clp->cl_session, in nfs4_layoutreturn_prepare()