Home
last modified time | relevance | path

Searched refs:clp (Results 1 – 25 of 52) sorted by relevance

123

/Linux-v4.19/fs/nfs/
Dnfs4state.c90 int nfs4_init_clientid(struct nfs_client *clp, struct rpc_cred *cred) in nfs4_init_clientid() argument
93 .clientid = clp->cl_clientid, in nfs4_init_clientid()
94 .confirm = clp->cl_confirm, in nfs4_init_clientid()
98 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs4_init_clientid()
100 if (test_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state)) in nfs4_init_clientid()
103 if (clp->cl_addr.ss_family == AF_INET6) in nfs4_init_clientid()
106 status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid); in nfs4_init_clientid()
109 clp->cl_clientid = clid.clientid; in nfs4_init_clientid()
110 clp->cl_confirm = clid.confirm; in nfs4_init_clientid()
111 set_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); in nfs4_init_clientid()
[all …]
Dnfs4renewd.c58 struct nfs_client *clp = in nfs4_renew_state() local
65 ops = clp->cl_mvops->state_renewal_ops; in nfs4_renew_state()
68 if (test_bit(NFS_CS_STOP_RENEW, &clp->cl_res_state)) in nfs4_renew_state()
71 spin_lock(&clp->cl_lock); in nfs4_renew_state()
72 lease = clp->cl_lease_time; in nfs4_renew_state()
73 last = clp->cl_last_renewal; in nfs4_renew_state()
78 if (nfs_delegations_present(clp)) in nfs4_renew_state()
82 cred = ops->get_state_renewal_cred_locked(clp); in nfs4_renew_state()
83 spin_unlock(&clp->cl_lock); in nfs4_renew_state()
86 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); in nfs4_renew_state()
[all …]
Dnfs4client.c27 static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion) in nfs_get_cb_ident_idr() argument
30 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs_get_cb_ident_idr()
32 if (clp->rpc_ops->version != 4 || minorversion != 0) in nfs_get_cb_ident_idr()
36 ret = idr_alloc(&nn->cb_ident_idr, clp, 1, 0, GFP_NOWAIT); in nfs_get_cb_ident_idr()
38 clp->cl_cb_ident = ret; in nfs_get_cb_ident_idr()
145 nfs4_shutdown_ds_clients(struct nfs_client *clp) in nfs4_shutdown_ds_clients() argument
150 while (!list_empty(&clp->cl_ds_clients)) { in nfs4_shutdown_ds_clients()
151 dss = list_entry(clp->cl_ds_clients.next, in nfs4_shutdown_ds_clients()
160 nfs4_cleanup_callback(struct nfs_client *clp) in nfs4_cleanup_callback() argument
164 while (!list_empty(&clp->pending_cb_stateids)) { in nfs4_cleanup_callback()
[all …]
Dclient.c153 struct nfs_client *clp; in nfs_alloc_client() local
157 if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL) in nfs_alloc_client()
160 clp->cl_nfs_mod = cl_init->nfs_mod; in nfs_alloc_client()
161 if (!try_module_get(clp->cl_nfs_mod->owner)) in nfs_alloc_client()
164 clp->rpc_ops = clp->cl_nfs_mod->rpc_ops; in nfs_alloc_client()
166 refcount_set(&clp->cl_count, 1); in nfs_alloc_client()
167 clp->cl_cons_state = NFS_CS_INITING; in nfs_alloc_client()
169 memcpy(&clp->cl_addr, cl_init->addr, cl_init->addrlen); in nfs_alloc_client()
170 clp->cl_addrlen = cl_init->addrlen; in nfs_alloc_client()
174 clp->cl_hostname = kstrdup(cl_init->hostname, GFP_KERNEL); in nfs_alloc_client()
[all …]
Dcallback_proc.c33 if (!cps->clp) /* Always set for v4.0. Set in cb_sequence for v4.1 */ in nfs4_callback_getattr()
40 rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR)); in nfs4_callback_getattr()
42 inode = nfs_delegation_find_inode(cps->clp, &args->fh); in nfs4_callback_getattr()
46 trace_nfs4_cb_getattr(cps->clp, &args->fh, NULL, in nfs4_callback_getattr()
68 trace_nfs4_cb_getattr(cps->clp, &args->fh, inode, -ntohl(res->status)); in nfs4_callback_getattr()
83 if (!cps->clp) /* Always set for v4.0. Set in cb_sequence for v4.1 */ in nfs4_callback_recall()
87 rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR)); in nfs4_callback_recall()
90 inode = nfs_delegation_find_inode(cps->clp, &args->fh); in nfs4_callback_recall()
94 trace_nfs4_cb_recall(cps->clp, &args->fh, NULL, in nfs4_callback_recall()
109 trace_nfs4_cb_recall(cps->clp, &args->fh, inode, in nfs4_callback_recall()
[all …]
Dnfs4_fs.h244 struct nfs_client *clp; member
290 extern int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred);
291 extern int nfs4_destroy_clientid(struct nfs_client *clp);
314 extern int nfs4_proc_get_lease_time(struct nfs_client *clp,
318 extern int nfs4_detect_session_trunking(struct nfs_client *clp,
322 is_ds_only_client(struct nfs_client *clp) in is_ds_only_client() argument
324 return (clp->cl_exchange_flags & EXCHGID4_FLAG_MASK_PNFS) == in is_ds_only_client()
329 is_ds_client(struct nfs_client *clp) in is_ds_client() argument
331 return clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_DS; in is_ds_client()
335 _nfs4_state_protect(struct nfs_client *clp, unsigned long sp4_mode, in _nfs4_state_protect() argument
[all …]
Ddelegation.c266 struct nfs_client *clp) in nfs_abort_delegation_return() argument
273 set_bit(NFS4CLNT_DELEGRETURN, &clp->cl_state); in nfs_abort_delegation_return()
279 struct nfs_client *clp) in nfs_detach_delegation_locked() argument
283 lockdep_is_held(&clp->cl_lock)); in nfs_detach_delegation_locked()
301 struct nfs_client *clp = server->nfs_client; in nfs_detach_delegation() local
303 spin_lock(&clp->cl_lock); in nfs_detach_delegation()
304 delegation = nfs_detach_delegation_locked(nfsi, delegation, clp); in nfs_detach_delegation()
305 spin_unlock(&clp->cl_lock); in nfs_detach_delegation()
349 struct nfs_client *clp = server->nfs_client; in nfs_inode_set_delegation() local
367 spin_lock(&clp->cl_lock); in nfs_inode_set_delegation()
[all …]
Dnfs4session.h73 struct nfs_client *clp; member
107 static inline struct nfs4_session *nfs4_get_session(const struct nfs_client *clp) in nfs4_get_session() argument
109 return clp->cl_session; in nfs4_get_session()
121 extern struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp);
123 extern int nfs4_init_session(struct nfs_client *clp);
129 static inline int nfs4_has_session(const struct nfs_client *clp) in nfs4_has_session() argument
131 if (clp->cl_session) in nfs4_has_session()
136 static inline int nfs4_has_persistent_session(const struct nfs_client *clp) in nfs4_has_persistent_session() argument
138 if (nfs4_has_session(clp)) in nfs4_has_persistent_session()
139 return (clp->cl_session->flags & SESSION4_PERSIST); in nfs4_has_persistent_session()
[all …]
Ddelegation.h47 struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle);
49 void nfs_expire_all_delegations(struct nfs_client *clp);
50 void nfs_expire_unused_delegation_types(struct nfs_client *clp, fmode_t flags);
51 void nfs_expire_unreferenced_delegations(struct nfs_client *clp);
52 int nfs_client_return_marked_delegations(struct nfs_client *clp);
53 int nfs_delegations_present(struct nfs_client *clp);
56 void nfs_delegation_mark_reclaim(struct nfs_client *clp);
57 void nfs_delegation_reap_unclaimed(struct nfs_client *clp);
59 void nfs_mark_test_expired_all_delegations(struct nfs_client *clp);
60 void nfs_reap_expired_delegations(struct nfs_client *clp);
Dnfs4session.c551 struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp) in nfs4_alloc_session() argument
563 session->clp = clp; in nfs4_alloc_session()
578 cred = nfs4_get_clid_cred(session->clp); in nfs4_destroy_session()
584 xprt = rcu_dereference(session->clp->cl_rpcclient->cl_xprt); in nfs4_destroy_session()
600 static int nfs41_check_session_ready(struct nfs_client *clp) in nfs41_check_session_ready() argument
604 if (clp->cl_cons_state == NFS_CS_SESSION_INITING) { in nfs41_check_session_ready()
605 ret = nfs4_client_recover_expired_lease(clp); in nfs41_check_session_ready()
609 if (clp->cl_cons_state < NFS_CS_READY) in nfs41_check_session_ready()
615 int nfs4_init_session(struct nfs_client *clp) in nfs4_init_session() argument
617 if (!nfs4_has_session(clp)) in nfs4_init_session()
[all …]
Dfscache.c53 void nfs_fscache_get_client_cookie(struct nfs_client *clp) in nfs_fscache_get_client_cookie() argument
55 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &clp->cl_addr; in nfs_fscache_get_client_cookie()
56 const struct sockaddr_in *sin = (struct sockaddr_in *) &clp->cl_addr; in nfs_fscache_get_client_cookie()
61 key.hdr.nfsversion = clp->rpc_ops->version; in nfs_fscache_get_client_cookie()
62 key.hdr.family = clp->cl_addr.ss_family; in nfs_fscache_get_client_cookie()
64 switch (clp->cl_addr.ss_family) { in nfs_fscache_get_client_cookie()
79 clp->cl_addr.ss_family); in nfs_fscache_get_client_cookie()
80 clp->fscache = NULL; in nfs_fscache_get_client_cookie()
85 clp->fscache = fscache_acquire_cookie(nfs_fscache_netfs.primary_index, in nfs_fscache_get_client_cookie()
89 clp, 0, true); in nfs_fscache_get_client_cookie()
[all …]
Dpnfs_nfs.c605 struct nfs_client *clp = ERR_PTR(-EIO); in _nfs4_pnfs_v3_ds_connect() local
618 if (!IS_ERR(clp)) { in _nfs4_pnfs_v3_ds_connect()
621 .net = clp->cl_net, in _nfs4_pnfs_v3_ds_connect()
624 .servername = clp->cl_hostname, in _nfs4_pnfs_v3_ds_connect()
627 rpc_clnt_add_xprt(clp->cl_rpcclient, &xprt_args, in _nfs4_pnfs_v3_ds_connect()
630 clp = get_v3_ds_connect(mds_srv, in _nfs4_pnfs_v3_ds_connect()
636 if (IS_ERR(clp)) { in _nfs4_pnfs_v3_ds_connect()
637 status = PTR_ERR(clp); in _nfs4_pnfs_v3_ds_connect()
642 ds->ds_clp = clp; in _nfs4_pnfs_v3_ds_connect()
654 struct nfs_client *clp = ERR_PTR(-EIO); in _nfs4_pnfs_v4_ds_connect() local
[all …]
Dpnfs_dev.c78 const struct nfs_client *clp, const struct nfs4_deviceid *id, in _lookup_deviceid() argument
84 if (d->ld == ld && d->nfs_client == clp && in _lookup_deviceid()
226 const struct nfs_client *clp, const struct nfs4_deviceid *id) in nfs4_delete_deviceid() argument
232 d = _lookup_deviceid(ld, clp, id, nfs4_deviceid_hash(id)); in nfs4_delete_deviceid()
311 _deviceid_purge_client(const struct nfs_client *clp, long hash) in _deviceid_purge_client() argument
319 if (d->nfs_client == clp && atomic_read(&d->ref)) { in _deviceid_purge_client()
338 nfs4_deviceid_purge_client(const struct nfs_client *clp) in nfs4_deviceid_purge_client() argument
342 if (!(clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS)) in nfs4_deviceid_purge_client()
345 _deviceid_purge_client(clp, h); in nfs4_deviceid_purge_client()
352 nfs4_deviceid_mark_client_invalid(struct nfs_client *clp) in nfs4_deviceid_mark_client_invalid() argument
[all …]
Dnfs4proc.c101 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp,
422 struct nfs_client *clp = server->nfs_client; in nfs4_do_handle_exception() local
474 nfs4_schedule_lease_recovery(clp); in nfs4_do_handle_exception()
482 nfs4_schedule_lease_moved_recovery(clp); in nfs4_do_handle_exception()
494 nfs4_schedule_session_recovery(clp->cl_session, errorcode); in nfs4_do_handle_exception()
544 struct nfs_client *clp = server->nfs_client; in nfs4_handle_exception() local
553 ret = nfs4_wait_clnt_recover(clp); in nfs4_handle_exception()
569 struct nfs_client *clp = server->nfs_client; in nfs4_async_handle_exception() local
578 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_exception()
579 if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) in nfs4_async_handle_exception()
[all …]
Dnfs3client.c95 struct nfs_client *clp; in nfs3_set_ds_client() local
108 clp = nfs_get_client(&cl_init); in nfs3_set_ds_client()
110 return clp; in nfs3_set_ds_client()
Dnfs4trace.h198 const struct nfs_client *clp,
202 TP_ARGS(clp, error),
205 __string(dstaddr, clp->cl_hostname)
211 __assign_str(dstaddr, clp->cl_hostname);
224 const struct nfs_client *clp, \
227 TP_ARGS(clp, error))
1121 const struct nfs_client *clp,
1127 TP_ARGS(clp, fhandle, inode, error),
1134 __string(dstaddr, clp ? clp->cl_hostname : "unknown")
1147 __assign_str(dstaddr, clp ? clp->cl_hostname : "unknown")
[all …]
Dcallback.c377 check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp) in check_gss_callback_principal() argument
385 if (clp->cl_minorversion != 0) in check_gss_callback_principal()
398 if (clp->cl_acceptor) in check_gss_callback_principal()
399 return !strcmp(p, clp->cl_acceptor); in check_gss_callback_principal()
411 if (strcmp(p, clp->cl_hostname) != 0) in check_gss_callback_principal()
/Linux-v4.19/fs/nfsd/
Dnfs4callback.c749 static struct rpc_cred *get_backchannel_cred(struct nfs4_client *clp, struct rpc_clnt *client, stru… in get_backchannel_cred() argument
751 if (clp->cl_minorversion == 0) { in get_backchannel_cred()
752 char *principal = clp->cl_cred.cr_targ_princ ? in get_backchannel_cred()
753 clp->cl_cred.cr_targ_princ : "nfs"; in get_backchannel_cred()
770 static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_s… in setup_callback_client() argument
772 int maxtime = max_cb_time(clp->net); in setup_callback_client()
779 .net = clp->net, in setup_callback_client()
791 if (clp->cl_minorversion == 0) { in setup_callback_client()
792 if (!clp->cl_cred.cr_principal && in setup_callback_client()
793 (clp->cl_cred.cr_flavor >= RPC_AUTH_GSS_KRB5)) in setup_callback_client()
[all …]
Dnfs4recover.c155 legacy_recdir_name_error(struct nfs4_client *clp, int error) in legacy_recdir_name_error() argument
168 nfsd4_client_tracking_exit(clp->net); in legacy_recdir_name_error()
173 nfsd4_create_clid_dir(struct nfs4_client *clp) in nfsd4_create_clid_dir() argument
180 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in nfsd4_create_clid_dir()
182 if (test_and_set_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags)) in nfsd4_create_clid_dir()
187 status = nfs4_make_rec_clidname(dname, &clp->cl_name); in nfsd4_create_clid_dir()
189 return legacy_recdir_name_error(clp, status); in nfsd4_create_clid_dir()
227 crp->cr_clp = clp; in nfsd4_create_clid_dir()
349 nfsd4_remove_clid_dir(struct nfs4_client *clp) in nfsd4_remove_clid_dir() argument
355 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in nfsd4_remove_clid_dir()
[all …]
Dnfs4state.c127 static bool is_client_expired(struct nfs4_client *clp) in is_client_expired() argument
129 return clp->cl_time == 0; in is_client_expired()
132 static __be32 get_client_locked(struct nfs4_client *clp) in get_client_locked() argument
134 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in get_client_locked()
138 if (is_client_expired(clp)) in get_client_locked()
140 atomic_inc(&clp->cl_refcount); in get_client_locked()
146 renew_client_locked(struct nfs4_client *clp) in renew_client_locked() argument
148 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in renew_client_locked()
150 if (is_client_expired(clp)) { in renew_client_locked()
154 clp->cl_clientid.cl_boot, in renew_client_locked()
[all …]
Dnfs4layouts.c158 struct nfs4_client *clp = ls->ls_stid.sc_client; in nfsd4_free_layout_stateid() local
163 spin_lock(&clp->cl_lock); in nfsd4_free_layout_stateid()
165 spin_unlock(&clp->cl_lock); in nfsd4_free_layout_stateid()
215 struct nfs4_client *clp = cstate->clp; in nfsd4_alloc_layout_stateid() local
220 stp = nfs4_alloc_stid(cstate->clp, nfs4_layout_stateid_cache, in nfsd4_alloc_layout_stateid()
235 nfsd4_init_cb(&ls->ls_recall, clp, &nfsd4_cb_layout_ops, in nfsd4_alloc_layout_stateid()
251 spin_lock(&clp->cl_lock); in nfsd4_alloc_layout_stateid()
253 list_add(&ls->ls_perclnt, &clp->cl_lo_states); in nfsd4_alloc_layout_stateid()
254 spin_unlock(&clp->cl_lock); in nfsd4_alloc_layout_stateid()
537 struct nfs4_client *clp = cstate->clp; in nfsd4_return_client_layouts() local
[all …]
Dpnfs.h27 struct nfs4_client *clp,
73 void nfsd4_return_all_file_layouts(struct nfs4_client *clp,
85 static inline void nfsd4_return_all_client_layouts(struct nfs4_client *clp) in nfsd4_return_all_client_layouts() argument
88 static inline void nfsd4_return_all_file_layouts(struct nfs4_client *clp, in nfsd4_return_all_file_layouts() argument
Dblocklayout.c171 struct nfs4_client *clp, in nfsd4_block_proc_getdeviceinfo() argument
324 static u64 nfsd4_scsi_pr_key(struct nfs4_client *clp) in nfsd4_scsi_pr_key() argument
326 return ((u64)clp->cl_clientid.cl_boot << 32) | clp->cl_clientid.cl_id; in nfsd4_scsi_pr_key()
331 struct nfs4_client *clp, in nfsd4_block_get_device_info_scsi() argument
349 b->scsi.pr_key = nfsd4_scsi_pr_key(clp); in nfsd4_block_get_device_info_scsi()
383 struct nfs4_client *clp, in nfsd4_scsi_proc_getdeviceinfo() argument
388 return nfserrno(nfsd4_block_get_device_info_scsi(sb, clp, gdp)); in nfsd4_scsi_proc_getdeviceinfo()
408 struct nfs4_client *clp = ls->ls_stid.sc_client; in nfsd4_scsi_fence_client() local
412 nfsd4_scsi_pr_key(clp), 0, true); in nfsd4_scsi_fence_client()
Dstate.h620 extern void nfsd4_probe_callback(struct nfs4_client *clp);
621 extern void nfsd4_probe_callback_sync(struct nfs4_client *clp);
622 extern void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *);
623 extern void nfsd4_init_cb(struct nfsd4_callback *cb, struct nfs4_client *clp,
648 extern void nfsd4_client_record_create(struct nfs4_client *clp);
649 extern void nfsd4_client_record_remove(struct nfs4_client *clp);
650 extern int nfsd4_client_record_check(struct nfs4_client *clp);
/Linux-v4.19/drivers/media/usb/pvrusb2/
Dpvrusb2-sysfs.c502 struct pvr2_sysfs_class *clp; in pvr2_sysfs_class_release() local
503 clp = container_of(class,struct pvr2_sysfs_class,class); in pvr2_sysfs_class_release()
504 pvr2_sysfs_trace("Destroying pvr2_sysfs_class id=%p",clp); in pvr2_sysfs_class_release()
505 kfree(clp); in pvr2_sysfs_class_release()
784 struct pvr2_sysfs_class *clp; in pvr2_sysfs_class_create() local
785 clp = kzalloc(sizeof(*clp),GFP_KERNEL); in pvr2_sysfs_class_create()
786 if (!clp) return clp; in pvr2_sysfs_class_create()
788 clp); in pvr2_sysfs_class_create()
789 clp->class.name = "pvrusb2"; in pvr2_sysfs_class_create()
790 clp->class.class_release = pvr2_sysfs_class_release; in pvr2_sysfs_class_create()
[all …]

123