Home
last modified time | relevance | path

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

12

/linux/fs/nfs/
H A Dnfs4state.c71 static void nfs4_state_start_reclaim_reboot(struct nfs_client *clp);
95 static int nfs4_setup_state_renewal(struct nfs_client *clp) in nfs4_setup_state_renewal() argument
100 if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state)) { in nfs4_setup_state_renewal()
101 nfs4_schedule_state_renewal(clp); in nfs4_setup_state_renewal()
105 status = nfs4_proc_get_lease_time(clp, &fsinfo); in nfs4_setup_state_renewal()
107 nfs4_set_lease_period(clp, fsinfo.lease_time); in nfs4_setup_state_renewal()
108 nfs4_schedule_state_renewal(clp); in nfs4_setup_state_renewal()
114 int nfs4_init_clientid(struct nfs_client *clp, const struct cred *cred) in nfs4_init_clientid() argument
117 .clientid = clp->cl_clientid, in nfs4_init_clientid()
118 .confirm = clp->cl_confirm, in nfs4_init_clientid()
[all …]
H A Dclient.c150 struct nfs_client *clp; in nfs_alloc_client() local
153 if ((clp = kzalloc_obj(*clp)) == NULL) in nfs_alloc_client()
156 clp->cl_minorversion = cl_init->minorversion; in nfs_alloc_client()
157 clp->cl_nfs_mod = cl_init->nfs_mod; in nfs_alloc_client()
158 if (!get_nfs_version(clp->cl_nfs_mod)) in nfs_alloc_client()
161 clp->rpc_ops = clp->cl_nfs_mod->rpc_ops; in nfs_alloc_client()
163 refcount_set(&clp->cl_count, 1); in nfs_alloc_client()
164 clp->cl_cons_state = NFS_CS_INITING; in nfs_alloc_client()
166 memcpy(&clp->cl_addr, cl_init->addr, cl_init->addrlen); in nfs_alloc_client()
167 clp->cl_addrlen = cl_init->addrlen; in nfs_alloc_client()
[all …]
H A Dnfs4client.c30 static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion) in nfs_get_cb_ident_idr() argument
33 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs_get_cb_ident_idr()
35 if (clp->rpc_ops->version != 4 || minorversion != 0) in nfs_get_cb_ident_idr()
39 ret = idr_alloc(&nn->cb_ident_idr, clp, 1, 0, GFP_NOWAIT); in nfs_get_cb_ident_idr()
41 clp->cl_cb_ident = ret; in nfs_get_cb_ident_idr()
153 nfs4_shutdown_ds_clients(struct nfs_client *clp) in nfs4_shutdown_ds_clients() argument
157 while (!list_empty(&clp->cl_ds_clients)) { in nfs4_shutdown_ds_clients()
158 dss = list_entry(clp->cl_ds_clients.next, in nfs4_shutdown_ds_clients()
167 nfs4_cleanup_callback(struct nfs_client *clp) in nfs4_cleanup_callback() argument
171 while (!list_empty(&clp->pending_cb_stateids)) { in nfs4_cleanup_callback()
[all …]
H A Dnfs40client.c49 void nfs40_shutdown_client(struct nfs_client *clp) in nfs40_shutdown_client() argument
51 if (clp->cl_slot_tbl) { in nfs40_shutdown_client()
52 nfs4_shutdown_slot_table(clp->cl_slot_tbl); in nfs40_shutdown_client()
53 kfree(clp->cl_slot_tbl); in nfs40_shutdown_client()
63 int nfs40_init_client(struct nfs_client *clp) in nfs40_init_client() argument
80 clp->cl_slot_tbl = tbl; in nfs40_init_client()
92 void nfs40_handle_cb_pathdown(struct nfs_client *clp) in nfs40_handle_cb_pathdown() argument
94 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); in nfs40_handle_cb_pathdown()
95 nfs_expire_all_delegations(clp); in nfs40_handle_cb_pathdown()
97 clp->cl_hostname); in nfs40_handle_cb_pathdown()
[all …]
H A Dcallback_proc.c37 if (!cps->clp) /* Always set for v4.0. Set in cb_sequence for v4.1 */ in nfs4_callback_getattr()
44 rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR)); in nfs4_callback_getattr()
46 inode = nfs_delegation_find_inode(cps->clp, &args->fh); in nfs4_callback_getattr()
50 trace_nfs4_cb_getattr(cps->clp, &args->fh, NULL, in nfs4_callback_getattr()
80 trace_nfs4_cb_getattr(cps->clp, &args->fh, inode, -ntohl(res->status)); in nfs4_callback_getattr()
95 if (!cps->clp) /* Always set for v4.0. Set in cb_sequence for v4.1 */ in nfs4_callback_recall()
99 rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR)); in nfs4_callback_recall()
102 inode = nfs_delegation_find_inode(cps->clp, &args->fh); in nfs4_callback_recall()
106 trace_nfs4_cb_recall(cps->clp, &args->fh, NULL, in nfs4_callback_recall()
121 trace_nfs4_cb_recall(cps->clp, &args->fh, inode, in nfs4_callback_recall()
[all …]
H A Dnfs40proc.c73 struct nfs_client *clp = data->client; in nfs4_renew_release() local
75 if (refcount_read(&clp->cl_count) > 1) in nfs4_renew_release()
76 nfs4_schedule_state_renewal(clp); in nfs4_renew_release()
77 nfs_put_client(clp); in nfs4_renew_release()
84 struct nfs_client *clp = data->client; in nfs4_renew_done() local
87 trace_nfs4_renew_async(clp, task->tk_status); in nfs4_renew_done()
92 nfs4_schedule_lease_moved_recovery(clp); in nfs4_renew_done()
96 if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) == 0) in nfs4_renew_done()
99 nfs4_schedule_lease_recovery(clp); in nfs4_renew_done()
102 nfs4_schedule_path_down_recovery(clp); in nfs4_renew_done()
[all …]
H A Ddelegation.c354 struct nfs_client *clp) in nfs_detach_delegations_locked() argument
356 lockdep_assert_held(&clp->cl_lock); in nfs_detach_delegations_locked()
378 struct nfs_client *clp = server->nfs_client; in nfs_detach_delegation() local
382 spin_lock(&clp->cl_lock); in nfs_detach_delegation()
384 lockdep_is_held(&clp->cl_lock)); in nfs_detach_delegation()
386 ret = nfs_detach_delegations_locked(nfsi, delegation, clp); in nfs_detach_delegation()
387 spin_unlock(&clp->cl_lock); in nfs_detach_delegation()
439 struct nfs_client *clp = server->nfs_client; in nfs_inode_set_delegation() local
465 spin_lock(&clp->cl_lock); in nfs_inode_set_delegation()
467 lockdep_is_held(&clp->cl_lock)); in nfs_inode_set_delegation()
[all …]
H A Dlocalio.c66 static inline bool nfs_client_is_local(const struct nfs_client *clp) in nfs_client_is_local() argument
68 return !!rcu_access_pointer(clp->cl_uuid.net); in nfs_client_is_local()
71 bool nfs_server_is_local(const struct nfs_client *clp) in nfs_server_is_local() argument
73 return nfs_client_is_local(clp) && localio_enabled; in nfs_server_is_local()
136 static struct rpc_clnt *nfs_init_localioclient(struct nfs_client *clp) in nfs_init_localioclient() argument
140 rpcclient_localio = rpc_bind_new_program(clp->cl_rpcclient, in nfs_init_localioclient()
144 __func__, rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR), in nfs_init_localioclient()
150 static bool nfs_server_uuid_is_local(struct nfs_client *clp) in nfs_server_uuid_is_local() argument
159 rpcclient_localio = nfs_init_localioclient(clp); in nfs_server_uuid_is_local()
163 export_uuid(uuid, &clp->cl_uuid.uuid); in nfs_server_uuid_is_local()
[all …]
H A Dpnfs_nfs.c811 struct nfs_client *clp = ERR_PTR(-EIO); in _nfs4_pnfs_v3_ds_connect() local
828 if (!IS_ERR(clp)) { in _nfs4_pnfs_v3_ds_connect()
831 .net = clp->cl_net, in _nfs4_pnfs_v3_ds_connect()
834 .servername = clp->cl_hostname, in _nfs4_pnfs_v3_ds_connect()
837 .xprtsec = clp->cl_xprtsec, in _nfs4_pnfs_v3_ds_connect()
841 clp->cl_proto == XPRT_TRANSPORT_TCP_TLS) in _nfs4_pnfs_v3_ds_connect()
844 if (xprt_args.ident != clp->cl_proto) in _nfs4_pnfs_v3_ds_connect()
847 clp->cl_addr.ss_family) in _nfs4_pnfs_v3_ds_connect()
850 rpc_clnt_add_xprt(clp->cl_rpcclient, &xprt_args, in _nfs4_pnfs_v3_ds_connect()
860 clp = get_v3_ds_connect(mds_srv, &da->da_addr, da->da_addrlen, in _nfs4_pnfs_v3_ds_connect()
[all …]
H A Dnfs4session.c557 struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp) in nfs4_alloc_session() argument
569 session->clp = clp; in nfs4_alloc_session()
584 cred = nfs4_get_clid_cred(session->clp); in nfs4_destroy_session()
589 xprt = rcu_dereference(session->clp->cl_rpcclient->cl_xprt); in nfs4_destroy_session()
605 static int nfs41_check_session_ready(struct nfs_client *clp) in nfs41_check_session_ready() argument
609 if (clp->cl_cons_state == NFS_CS_SESSION_INITING) { in nfs41_check_session_ready()
610 ret = nfs4_client_recover_expired_lease(clp); in nfs41_check_session_ready()
614 if (clp->cl_cons_state < NFS_CS_READY) in nfs41_check_session_ready()
620 int nfs4_init_session(struct nfs_client *clp) in nfs4_init_session() argument
622 if (!nfs4_has_session(clp)) in nfs4_init_session()
[all …]
H A Dsysfs.c202 struct nfs_netns_client *clp; in nfs_netns_sysfs_setup() local
204 clp = nfs_netns_client_alloc(&nfs_kset->kobj, net); in nfs_netns_sysfs_setup()
205 if (clp) { in nfs_netns_sysfs_setup()
206 netns->nfs_client = clp; in nfs_netns_sysfs_setup()
207 kobject_uevent(&clp->kobject, KOBJ_ADD); in nfs_netns_sysfs_setup()
213 struct nfs_netns_client *clp = netns->nfs_client; in nfs_netns_sysfs_destroy() local
215 if (clp) { in nfs_netns_sysfs_destroy()
216 kobject_uevent(&clp->kobject, KOBJ_REMOVE); in nfs_netns_sysfs_destroy()
217 kobject_del(&clp->kobject); in nfs_netns_sysfs_destroy()
218 kobject_put(&clp->kobject); in nfs_netns_sysfs_destroy()
[all …]
H A Dnfs4proc.c102 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp,
506 struct nfs_client *clp = server->nfs_client; in nfs4_do_handle_exception() local
560 nfs4_schedule_lease_recovery(clp); in nfs4_do_handle_exception()
568 nfs4_schedule_lease_moved_recovery(clp); in nfs4_do_handle_exception()
642 struct nfs_client *clp = server->nfs_client; in nfs4_handle_exception() local
659 ret = nfs4_wait_clnt_recover(clp); in nfs4_handle_exception()
675 struct nfs_client *clp = server->nfs_client; in nfs4_async_handle_exception() local
700 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_exception()
701 if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) in nfs4_async_handle_exception()
702 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); in nfs4_async_handle_exception()
[all …]
H A Dpnfs_dev.c80 const struct nfs_client *clp, const struct nfs4_deviceid *id, in _lookup_deviceid() argument
86 if (d->ld == ld && d->nfs_client == clp && in _lookup_deviceid()
229 const struct nfs_client *clp, const struct nfs4_deviceid *id) in nfs4_delete_deviceid() argument
235 d = _lookup_deviceid(ld, clp, id, nfs4_deviceid_hash(id)); in nfs4_delete_deviceid()
328 _deviceid_purge_client(const struct nfs_client *clp, long hash) in _deviceid_purge_client() argument
336 if (d->nfs_client == clp && atomic_read(&d->ref)) { in _deviceid_purge_client()
355 nfs4_deviceid_purge_client(const struct nfs_client *clp) in nfs4_deviceid_purge_client() argument
359 if (!(clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS)) in nfs4_deviceid_purge_client()
362 _deviceid_purge_client(clp, h); in nfs4_deviceid_purge_client()
369 nfs4_deviceid_mark_client_invalid(struct nfs_client *clp) in nfs4_deviceid_mark_client_invalid() argument
[all …]
H A Dfscache.c46 static bool nfs_fscache_get_client_key(struct nfs_client *clp, in nfs_fscache_get_client_key() argument
49 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &clp->cl_addr; in nfs_fscache_get_client_key()
50 const struct sockaddr_in *sin = (struct sockaddr_in *) &clp->cl_addr; in nfs_fscache_get_client_key()
54 clp->rpc_ops->version, in nfs_fscache_get_client_key()
55 clp->cl_minorversion, in nfs_fscache_get_client_key()
56 clp->cl_addr.ss_family); in nfs_fscache_get_client_key()
58 switch (clp->cl_addr.ss_family) { in nfs_fscache_get_client_key()
76 clp->cl_addr.ss_family); in nfs_fscache_get_client_key()
H A Dinternal.h244 extern bool nfs_client_init_is_complete(const struct nfs_client *clp);
245 extern int nfs_client_init_status(const struct nfs_client *clp);
246 extern int nfs_wait_client_init_complete(const struct nfs_client *clp);
247 extern void nfs_mark_client_ready(struct nfs_client *clp, int state);
385 extern struct nfs_client *nfs_init_client(struct nfs_client *clp,
480 extern bool nfs_server_is_local(const struct nfs_client *clp);
483 static inline void nfs_local_probe(struct nfs_client *clp) {} in nfs_local_probe() argument
484 static inline void nfs_local_probe_async(struct nfs_client *clp) {} in nfs_local_probe_async() argument
486 nfs_local_open_fh(struct nfs_client *clp, const struct cred *cred, in nfs_local_open_fh() argument
492 static inline int nfs_local_doio(struct nfs_client *clp, in nfs_local_doio() argument
[all …]
H A Dpnfs.c284 struct nfs_client *clp = server->nfs_client; in pnfs_free_layout_hdr() local
286 spin_lock(&clp->cl_lock); in pnfs_free_layout_hdr()
288 spin_unlock(&clp->cl_lock); in pnfs_free_layout_hdr()
845 pnfs_layout_bulk_destroy_byserver_locked(struct nfs_client *clp, in pnfs_layout_bulk_destroy_byserver_locked() argument
848 __must_hold(&clp->cl_lock) in pnfs_layout_bulk_destroy_byserver_locked()
868 spin_unlock(&clp->cl_lock); in pnfs_layout_bulk_destroy_byserver_locked()
872 spin_unlock(&clp->cl_lock); in pnfs_layout_bulk_destroy_byserver_locked()
875 spin_lock(&clp->cl_lock); in pnfs_layout_bulk_destroy_byserver_locked()
920 int pnfs_layout_destroy_byfsid(struct nfs_client *clp, struct nfs_fsid *fsid, in pnfs_layout_destroy_byfsid() argument
926 spin_lock(&clp->cl_lock); in pnfs_layout_destroy_byfsid()
[all …]
H A Dnfs4idmap.c442 nfs_idmap_new(struct nfs_client *clp) in nfs_idmap_new() argument
453 idmap->user_ns = get_user_ns(clp->cl_rpcclient->cl_cred->user_ns); in nfs_idmap_new()
466 error = rpc_add_pipe_dir_object(clp->cl_net, in nfs_idmap_new()
467 &clp->cl_rpcclient->cl_pipedir_objects, in nfs_idmap_new()
472 clp->cl_idmap = idmap; in nfs_idmap_new()
483 nfs_idmap_delete(struct nfs_client *clp) in nfs_idmap_delete() argument
485 struct idmap *idmap = clp->cl_idmap; in nfs_idmap_delete()
489 clp->cl_idmap = NULL; in nfs_idmap_delete()
490 rpc_remove_pipe_dir_object(clp->cl_net, in nfs_idmap_delete()
491 &clp->cl_rpcclient->cl_pipedir_objects, in nfs_idmap_delete()
H A Dsuper.c215 int nfs_client_for_each_server(struct nfs_client *clp, in nfs_client_for_each_server() argument
222 list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) { in nfs_client_for_each_server()
409 struct nfs_client *clp = nfss->nfs_client; in nfs_show_nfsv4_options() local
411 seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr); in nfs_show_nfsv4_options()
458 struct nfs_client *clp = nfss->nfs_client; in nfs_show_mount_options() local
459 u32 version = clp->rpc_ops->version; in nfs_show_mount_options()
462 nfs_show_nfs_version(m, version, clp->cl_minorversion); in nfs_show_mount_options()
488 if (clp->cl_nconnect > 0) in nfs_show_mount_options()
489 seq_printf(m, ",nconnect=%u", clp->cl_nconnect); in nfs_show_mount_options()
491 if (clp->cl_max_connect > 1) in nfs_show_mount_options()
[all …]
/linux/fs/nfsd/
H A Dnfs4state.c158 static bool is_client_expired(struct nfs4_client *clp) in is_client_expired() argument
160 return clp->cl_time == 0; in is_client_expired()
164 struct nfs4_client *clp) in nfsd4_dec_courtesy_client_count() argument
166 if (clp->cl_state != NFSD4_ACTIVE) in nfsd4_dec_courtesy_client_count()
170 static __be32 get_client_locked(struct nfs4_client *clp) in get_client_locked() argument
172 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in get_client_locked()
176 if (is_client_expired(clp)) in get_client_locked()
178 atomic_inc(&clp->cl_rpc_users); in get_client_locked()
179 nfsd4_dec_courtesy_client_count(nn, clp); in get_client_locked()
180 clp->cl_state = NFSD4_ACTIVE; in get_client_locked()
[all …]
H A Dtrace.h828 const struct nfs4_client *clp,
831 TP_ARGS(clp, cs),
837 __sockaddr(addr, clp->cl_cb_conn.cb_addrlen)
840 const struct nfsd4_clid_slot *slot = &clp->cl_cs_slot;
842 __entry->cl_boot = clp->cl_clientid.cl_boot;
843 __entry->cl_id = clp->cl_clientid.cl_id;
844 __assign_sockaddr(addr, &clp->cl_cb_conn.cb_addr,
845 clp->cl_cb_conn.cb_addrlen);
858 const struct nfs4_client *clp, \
861 TP_ARGS(clp, cs))
[all …]
H A Dstate.h824 extern void nfsd4_probe_callback(struct nfs4_client *clp);
825 extern void nfsd4_probe_callback_sync(struct nfs4_client *clp);
826 extern void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *);
831 extern void nfsd4_init_cb(struct nfsd4_callback *cb, struct nfs4_client *clp,
842 extern void nfsd4_shutdown_copy(struct nfs4_client *clp);
843 void nfsd4_put_client(struct nfs4_client *clp);
845 bool nfsd4_has_active_async_copies(struct nfs4_client *clp);
855 struct nfs4_client *clp,
890 extern void nfsd4_client_record_create(struct nfs4_client *clp);
891 extern void nfsd4_client_record_remove(struct nfs4_client *clp);
[all …]
H A Dnfs4proc.c585 !test_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, &cstate->clp->cl_flags) && in nfsd4_open()
636 status = nfs4_check_open_reclaim(cstate->clp); in nfsd4_open()
1438 bool nfsd4_has_active_async_copies(struct nfs4_client *clp) in nfsd4_has_active_async_copies() argument
1443 spin_lock(&clp->async_lock); in nfsd4_has_active_async_copies()
1444 list_for_each_entry(copy, &clp->async_copies, copies) { in nfsd4_has_active_async_copies()
1451 spin_unlock(&clp->async_lock); in nfsd4_has_active_async_copies()
1461 struct nfs4_client *clp; in nfsd4_async_copy_reaper() local
1466 list_for_each_entry(clp, &nn->client_lru, cl_lru) { in nfsd4_async_copy_reaper()
1469 spin_lock(&clp->async_lock); in nfsd4_async_copy_reaper()
1470 list_for_each_safe(pos, next, &clp->async_copies) { in nfsd4_async_copy_reaper()
[all …]
/linux/drivers/clk/
H A Dclk-loongson2.c320 struct loongson2_clk_provider *clp, in loongson2_clk_register() argument
329 clk = devm_kzalloc(clp->dev, sizeof(*clk), GFP_KERNEL); in loongson2_clk_register()
339 clk->reg = clp->base + cld->reg_offset; in loongson2_clk_register()
348 ret = devm_clk_hw_register(clp->dev, hw); in loongson2_clk_register()
360 struct loongson2_clk_provider *clp; in loongson2_clk_probe() local
376 clp = devm_kzalloc(dev, struct_size(clp, clk_data.hws, clks_num), in loongson2_clk_probe()
378 if (!clp) in loongson2_clk_probe()
381 clp->base = devm_platform_ioremap_resource(pdev, 0); in loongson2_clk_probe()
382 if (IS_ERR(clp->base)) in loongson2_clk_probe()
383 return PTR_ERR(clp->base); in loongson2_clk_probe()
[all …]
/linux/fs/nfs_common/
H A Dnfslocalio.c141 void nfs_localio_enable_client(struct nfs_client *clp) in nfs_localio_enable_client() argument
144 trace_nfs_localio_enable_client(clp); in nfs_localio_enable_client()
219 void nfs_localio_disable_client(struct nfs_client *clp) in nfs_localio_disable_client() argument
221 if (nfs_uuid_put(&clp->cl_uuid)) in nfs_localio_disable_client()
222 trace_nfs_localio_disable_client(clp); in nfs_localio_disable_client()
231 struct nfs_client *clp; in nfs_localio_invalidate_clients() local
239 clp = container_of(nfs_uuid, struct nfs_client, cl_uuid); in nfs_localio_invalidate_clients()
240 nfs_localio_disable_client(clp); in nfs_localio_invalidate_clients()
/linux/include/linux/
H A Dnfslocalio.h47 void nfs_localio_enable_client(struct nfs_client *clp);
48 void nfs_localio_disable_client(struct nfs_client *clp);
117 static inline void nfs_localio_disable_client(struct nfs_client *clp) in nfs_localio_disable_client() argument

12