| /linux/fs/nfs/ |
| H A D | nfs4state.c | 70 static void nfs4_state_start_reclaim_reboot(struct nfs_client *clp); 94 static int nfs4_setup_state_renewal(struct nfs_client *clp) in nfs4_setup_state_renewal() argument 99 if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state)) { in nfs4_setup_state_renewal() 100 nfs4_schedule_state_renewal(clp); in nfs4_setup_state_renewal() 104 status = nfs4_proc_get_lease_time(clp, &fsinfo); in nfs4_setup_state_renewal() 106 nfs4_set_lease_period(clp, fsinfo.lease_time * HZ); in nfs4_setup_state_renewal() 107 nfs4_schedule_state_renewal(clp); in nfs4_setup_state_renewal() 113 int nfs4_init_clientid(struct nfs_client *clp, const struct cred *cred) in nfs4_init_clientid() argument 116 .clientid = clp->cl_clientid, in nfs4_init_clientid() 117 .confirm = clp->cl_confirm, in nfs4_init_clientid() [all …]
|
| H A D | client.c | 150 struct nfs_client *clp; in nfs_alloc_client() local 153 if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == 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 D | nfs4client.c | 30 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() 154 nfs4_shutdown_ds_clients(struct nfs_client *clp) in nfs4_shutdown_ds_clients() argument 158 while (!list_empty(&clp->cl_ds_clients)) { in nfs4_shutdown_ds_clients() 159 dss = list_entry(clp->cl_ds_clients.next, in nfs4_shutdown_ds_clients() 168 nfs4_cleanup_callback(struct nfs_client *clp) in nfs4_cleanup_callback() argument 172 while (!list_empty(&clp->pending_cb_stateids)) { in nfs4_cleanup_callback() [all …]
|
| H A D | nfs4renewd.c | 58 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 lease = clp->cl_lease_time; in nfs4_renew_state() 72 last = clp->cl_last_renewal; in nfs4_renew_state() 77 if (nfs_delegations_present(clp)) in nfs4_renew_state() 81 cred = ops->get_state_renewal_cred(clp); in nfs4_renew_state() 84 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); in nfs4_renew_state() 87 nfs_expire_all_delegations(clp); in nfs4_renew_state() 92 ret = ops->sched_state_renewal(clp, cred, renew_flags); in nfs4_renew_state() [all …]
|
| H A D | nfs4session.h | 75 struct nfs_client *clp; member 109 static inline struct nfs4_session *nfs4_get_session(const struct nfs_client *clp) in nfs4_get_session() argument 111 return clp->cl_session; in nfs4_get_session() 123 extern struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp); 125 extern int nfs4_init_session(struct nfs_client *clp); 131 static inline int nfs4_has_session(const struct nfs_client *clp) in nfs4_has_session() argument 133 if (clp->cl_session) in nfs4_has_session() 138 static inline int nfs4_has_persistent_session(const struct nfs_client *clp) in nfs4_has_persistent_session() argument 140 if (nfs4_has_session(clp)) in nfs4_has_persistent_session() 141 return (clp->cl_session->flags & SESSION4_PERSIST); in nfs4_has_persistent_session() [all …]
|
| H A D | nfs4_fs.h | 255 struct nfs_client *clp; member 302 extern int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred); 303 extern int nfs4_destroy_clientid(struct nfs_client *clp); 334 extern int nfs4_proc_get_lease_time(struct nfs_client *clp, 349 extern int nfs4_detect_session_trunking(struct nfs_client *clp, 353 is_ds_only_client(struct nfs_client *clp) in is_ds_only_client() argument 355 return (clp->cl_exchange_flags & EXCHGID4_FLAG_MASK_PNFS) == in is_ds_only_client() 360 is_ds_client(struct nfs_client *clp) in is_ds_client() argument 362 return clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_DS; in is_ds_client() 366 _nfs4_state_protect(struct nfs_client *clp, unsigned long sp4_mode, in _nfs4_state_protect() argument [all …]
|
| H A D | delegation.c | 368 struct nfs_client *clp) in nfs_detach_delegation_locked() argument 372 lockdep_is_held(&clp->cl_lock)); in nfs_detach_delegation_locked() 397 struct nfs_client *clp = server->nfs_client; in nfs_detach_delegation() local 399 spin_lock(&clp->cl_lock); in nfs_detach_delegation() 400 delegation = nfs_detach_delegation_locked(nfsi, delegation, clp); in nfs_detach_delegation() 401 spin_unlock(&clp->cl_lock); in nfs_detach_delegation() 468 struct nfs_client *clp = server->nfs_client; in nfs_inode_set_delegation() local 493 spin_lock(&clp->cl_lock); in nfs_inode_set_delegation() 495 lockdep_is_held(&clp->cl_lock)); in nfs_inode_set_delegation() 516 __func__, clp->cl_hostname); in nfs_inode_set_delegation() [all …]
|
| H A D | localio.c | 61 static inline bool nfs_client_is_local(const struct nfs_client *clp) in nfs_client_is_local() argument 63 return !!rcu_access_pointer(clp->cl_uuid.net); in nfs_client_is_local() 66 bool nfs_server_is_local(const struct nfs_client *clp) in nfs_server_is_local() argument 68 return nfs_client_is_local(clp) && localio_enabled; in nfs_server_is_local() 131 static struct rpc_clnt *nfs_init_localioclient(struct nfs_client *clp) in nfs_init_localioclient() argument 135 rpcclient_localio = rpc_bind_new_program(clp->cl_rpcclient, in nfs_init_localioclient() 139 __func__, rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR), in nfs_init_localioclient() 145 static bool nfs_server_uuid_is_local(struct nfs_client *clp) in nfs_server_uuid_is_local() argument 154 rpcclient_localio = nfs_init_localioclient(clp); in nfs_server_uuid_is_local() 158 export_uuid(uuid, &clp->cl_uuid.uuid); in nfs_server_uuid_is_local() [all …]
|
| H A D | delegation.h | 57 struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle); 59 void nfs_expire_all_delegations(struct nfs_client *clp); 60 void nfs_expire_unused_delegation_types(struct nfs_client *clp, fmode_t flags); 61 void nfs_expire_unreferenced_delegations(struct nfs_client *clp); 62 int nfs_client_return_marked_delegations(struct nfs_client *clp); 63 int nfs_delegations_present(struct nfs_client *clp); 67 void nfs_delegation_mark_reclaim(struct nfs_client *clp); 68 void nfs_delegation_reap_unclaimed(struct nfs_client *clp); 70 void nfs_mark_test_expired_all_delegations(struct nfs_client *clp); 71 void nfs_test_expired_all_delegations(struct nfs_client *clp); [all …]
|
| H A D | pnfs_nfs.c | 811 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 D | nfs4session.c | 559 struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp) in nfs4_alloc_session() argument 571 session->clp = clp; in nfs4_alloc_session() 586 cred = nfs4_get_clid_cred(session->clp); in nfs4_destroy_session() 591 xprt = rcu_dereference(session->clp->cl_rpcclient->cl_xprt); in nfs4_destroy_session() 607 static int nfs41_check_session_ready(struct nfs_client *clp) in nfs41_check_session_ready() argument 611 if (clp->cl_cons_state == NFS_CS_SESSION_INITING) { in nfs41_check_session_ready() 612 ret = nfs4_client_recover_expired_lease(clp); in nfs41_check_session_ready() 616 if (clp->cl_cons_state < NFS_CS_READY) in nfs41_check_session_ready() 622 int nfs4_init_session(struct nfs_client *clp) in nfs4_init_session() argument 624 if (!nfs4_has_session(clp)) in nfs4_init_session() [all …]
|
| H A D | sysfs.c | 199 struct nfs_netns_client *clp; in nfs_netns_sysfs_setup() local 201 clp = nfs_netns_client_alloc(&nfs_kset->kobj, net); in nfs_netns_sysfs_setup() 202 if (clp) { in nfs_netns_sysfs_setup() 203 netns->nfs_client = clp; in nfs_netns_sysfs_setup() 204 kobject_uevent(&clp->kobject, KOBJ_ADD); in nfs_netns_sysfs_setup() 210 struct nfs_netns_client *clp = netns->nfs_client; in nfs_netns_sysfs_destroy() local 212 if (clp) { in nfs_netns_sysfs_destroy() 213 kobject_uevent(&clp->kobject, KOBJ_REMOVE); in nfs_netns_sysfs_destroy() 214 kobject_del(&clp->kobject); in nfs_netns_sysfs_destroy() 215 kobject_put(&clp->kobject); in nfs_netns_sysfs_destroy() [all …]
|
| H A D | nfs4proc.c | 102 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, 507 struct nfs_client *clp = server->nfs_client; in nfs4_do_handle_exception() local 561 nfs4_schedule_lease_recovery(clp); in nfs4_do_handle_exception() 569 nfs4_schedule_lease_moved_recovery(clp); in nfs4_do_handle_exception() 645 struct nfs_client *clp = server->nfs_client; in nfs4_handle_exception() local 662 ret = nfs4_wait_clnt_recover(clp); in nfs4_handle_exception() 678 struct nfs_client *clp = server->nfs_client; in nfs4_async_handle_exception() local 703 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_exception() 704 if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) in nfs4_async_handle_exception() 705 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); in nfs4_async_handle_exception() [all …]
|
| H A D | pnfs_dev.c | 80 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 D | internal.h | 244 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); 387 extern struct nfs_client *nfs_init_client(struct nfs_client *clp, 482 extern bool nfs_server_is_local(const struct nfs_client *clp); 485 static inline void nfs_local_probe(struct nfs_client *clp) {} in nfs_local_probe() argument 486 static inline void nfs_local_probe_async(struct nfs_client *clp) {} in nfs_local_probe_async() argument 488 nfs_local_open_fh(struct nfs_client *clp, const struct cred *cred, in nfs_local_open_fh() argument 494 static inline int nfs_local_doio(struct nfs_client *clp, in nfs_local_doio() argument [all …]
|
| /linux/fs/nfsd/ |
| H A D | nfs4callback.c | 1087 struct nfs4_client *clp = cb->cb_clp; in nfsd4_queue_cb() local 1089 trace_nfsd_cb_queue(clp, cb); in nfsd4_queue_cb() 1090 return queue_work(clp->cl_callback_wq, &cb->cb_work); in nfsd4_queue_cb() 1095 struct nfs4_client *clp = cb->cb_clp; in nfsd4_requeue_cb() local 1097 if (!test_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags)) { in nfsd4_requeue_cb() 1098 trace_nfsd_cb_restart(clp, cb); in nfsd4_requeue_cb() 1104 static void nfsd41_cb_inflight_begin(struct nfs4_client *clp) in nfsd41_cb_inflight_begin() argument 1106 atomic_inc(&clp->cl_cb_inflight); in nfsd41_cb_inflight_begin() 1109 static void nfsd41_cb_inflight_end(struct nfs4_client *clp) in nfsd41_cb_inflight_end() argument 1112 atomic_dec_and_wake_up(&clp->cl_cb_inflight); in nfsd41_cb_inflight_end() [all …]
|
| H A D | nfs4state.c | 163 static bool is_client_expired(struct nfs4_client *clp) in is_client_expired() argument 165 return clp->cl_time == 0; in is_client_expired() 169 struct nfs4_client *clp) in nfsd4_dec_courtesy_client_count() argument 171 if (clp->cl_state != NFSD4_ACTIVE) in nfsd4_dec_courtesy_client_count() 175 static __be32 get_client_locked(struct nfs4_client *clp) in get_client_locked() argument 177 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in get_client_locked() 181 if (is_client_expired(clp)) in get_client_locked() 183 atomic_inc(&clp->cl_rpc_users); in get_client_locked() 184 nfsd4_dec_courtesy_client_count(nn, clp); in get_client_locked() 185 clp->cl_state = NFSD4_ACTIVE; in get_client_locked() [all …]
|
| H A D | nfs4recover.c | 110 __nfsd4_create_reclaim_record_grace(struct nfs4_client *clp, in __nfsd4_create_reclaim_record_grace() argument 118 crp->cr_clp = clp; in __nfsd4_create_reclaim_record_grace() 122 nfsd4_create_clid_dir(struct nfs4_client *clp) in nfsd4_create_clid_dir() argument 128 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in nfsd4_create_clid_dir() 130 if (test_and_set_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags)) in nfsd4_create_clid_dir() 135 nfs4_make_rec_clidname(dname, &clp->cl_name); in nfsd4_create_clid_dir() 170 __nfsd4_create_reclaim_record_grace(clp, dname, nn); in nfsd4_create_clid_dir() 294 nfsd4_remove_clid_dir(struct nfs4_client *clp) in nfsd4_remove_clid_dir() argument 299 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in nfsd4_remove_clid_dir() 301 if (!nn->rec_file || !test_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags)) in nfsd4_remove_clid_dir() [all …]
|
| H A D | trace.h | 792 const struct nfs4_client *clp, 795 TP_ARGS(clp, cs), 801 __sockaddr(addr, clp->cl_cb_conn.cb_addrlen) 804 const struct nfsd4_clid_slot *slot = &clp->cl_cs_slot; 806 __entry->cl_boot = clp->cl_clientid.cl_boot; 807 __entry->cl_id = clp->cl_clientid.cl_id; 808 __assign_sockaddr(addr, &clp->cl_cb_conn.cb_addr, 809 clp->cl_cb_conn.cb_addrlen); 822 const struct nfs4_client *clp, \ 825 TP_ARGS(clp, cs)) [all …]
|
| H A D | nfs4layouts.c | 175 struct nfs4_client *clp = ls->ls_stid.sc_client; in nfsd4_free_layout_stateid() local 180 spin_lock(&clp->cl_lock); in nfsd4_free_layout_stateid() 182 spin_unlock(&clp->cl_lock); in nfsd4_free_layout_stateid() 229 struct nfs4_client *clp = cstate->clp; in nfsd4_alloc_layout_stateid() local 234 stp = nfs4_alloc_stid(cstate->clp, nfs4_layout_stateid_cache, in nfsd4_alloc_layout_stateid() 249 nfsd4_init_cb(&ls->ls_recall, clp, &nfsd4_cb_layout_ops, in nfsd4_alloc_layout_stateid() 265 spin_lock(&clp->cl_lock); in nfsd4_alloc_layout_stateid() 267 list_add(&ls->ls_perclnt, &clp->cl_lo_states); in nfsd4_alloc_layout_stateid() 268 spin_unlock(&clp->cl_lock); in nfsd4_alloc_layout_stateid() 552 struct nfs4_client *clp = cstate->clp; in nfsd4_return_client_layouts() local [all …]
|
| H A D | blocklayout.c | 228 struct nfs4_client *clp, in nfsd4_block_proc_getdeviceinfo() argument 282 static u64 nfsd4_scsi_pr_key(struct nfs4_client *clp) in nfsd4_scsi_pr_key() argument 284 return ((u64)clp->cl_clientid.cl_boot << 32) | clp->cl_clientid.cl_id; in nfsd4_scsi_pr_key() 314 struct nfs4_client *clp, in nfsd4_block_get_device_info_scsi() argument 331 b->scsi.pr_key = nfsd4_scsi_pr_key(clp); in nfsd4_block_get_device_info_scsi() 371 struct nfs4_client *clp, in nfsd4_scsi_proc_getdeviceinfo() argument 376 return nfserrno(nfsd4_block_get_device_info_scsi(sb, clp, gdp)); in nfsd4_scsi_proc_getdeviceinfo() 400 struct nfs4_client *clp = ls->ls_stid.sc_client; in nfsd4_scsi_fence_client() local 405 nfsd4_scsi_pr_key(clp), in nfsd4_scsi_fence_client() 407 trace_nfsd_pnfs_fence(clp, bdev->bd_disk->disk_name, status); in nfsd4_scsi_fence_client()
|
| H A D | pnfs.h | 27 struct nfs4_client *clp, 75 void nfsd4_return_all_file_layouts(struct nfs4_client *clp, 89 static inline void nfsd4_return_all_client_layouts(struct nfs4_client *clp) in nfsd4_return_all_client_layouts() argument 92 static inline void nfsd4_return_all_file_layouts(struct nfs4_client *clp, in nfsd4_return_all_file_layouts() argument
|
| /linux/drivers/clk/ |
| H A D | clk-loongson2.c | 320 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 D | nfslocalio.c | 141 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 D | nfslocalio.h | 47 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
|