/Linux-v6.6/fs/nfs/ |
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 …]
|
D | client.c | 151 struct nfs_client *clp; in nfs_alloc_client() local 154 if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL) in nfs_alloc_client() 157 clp->cl_minorversion = cl_init->minorversion; in nfs_alloc_client() 158 clp->cl_nfs_mod = cl_init->nfs_mod; in nfs_alloc_client() 159 if (!try_module_get(clp->cl_nfs_mod->owner)) in nfs_alloc_client() 162 clp->rpc_ops = clp->cl_nfs_mod->rpc_ops; in nfs_alloc_client() 164 refcount_set(&clp->cl_count, 1); in nfs_alloc_client() 165 clp->cl_cons_state = NFS_CS_INITING; in nfs_alloc_client() 167 memcpy(&clp->cl_addr, cl_init->addr, cl_init->addrlen); in nfs_alloc_client() 168 clp->cl_addrlen = cl_init->addrlen; in nfs_alloc_client() [all …]
|
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 …]
|
D | nfs4client.c | 29 static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion) in nfs_get_cb_ident_idr() argument 32 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id); in nfs_get_cb_ident_idr() 34 if (clp->rpc_ops->version != 4 || minorversion != 0) in nfs_get_cb_ident_idr() 38 ret = idr_alloc(&nn->cb_ident_idr, clp, 1, 0, GFP_NOWAIT); in nfs_get_cb_ident_idr() 40 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 …]
|
D | callback_proc.c | 37 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() 71 trace_nfs4_cb_getattr(cps->clp, &args->fh, inode, -ntohl(res->status)); in nfs4_callback_getattr() 86 if (!cps->clp) /* Always set for v4.0. Set in cb_sequence for v4.1 */ in nfs4_callback_recall() 90 rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR)); in nfs4_callback_recall() 93 inode = nfs_delegation_find_inode(cps->clp, &args->fh); in nfs4_callback_recall() 97 trace_nfs4_cb_recall(cps->clp, &args->fh, NULL, in nfs4_callback_recall() 112 trace_nfs4_cb_recall(cps->clp, &args->fh, inode, in nfs4_callback_recall() [all …]
|
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 …]
|
D | delegation.c | 324 struct nfs_client *clp, int err) in nfs_abort_delegation_return() argument 331 set_bit(NFS4CLNT_DELEGRETURN_DELAYED, &clp->cl_state); in nfs_abort_delegation_return() 339 struct nfs_client *clp) in nfs_detach_delegation_locked() argument 343 lockdep_is_held(&clp->cl_lock)); in nfs_detach_delegation_locked() 364 struct nfs_client *clp = server->nfs_client; in nfs_detach_delegation() local 366 spin_lock(&clp->cl_lock); in nfs_detach_delegation() 367 delegation = nfs_detach_delegation_locked(nfsi, delegation, clp); in nfs_detach_delegation() 368 spin_unlock(&clp->cl_lock); in nfs_detach_delegation() 434 struct nfs_client *clp = server->nfs_client; in nfs_inode_set_delegation() local 453 spin_lock(&clp->cl_lock); in nfs_inode_set_delegation() [all …]
|
D | nfs4_fs.h | 255 struct nfs_client *clp; member 301 extern int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred); 302 extern int nfs4_destroy_clientid(struct nfs_client *clp); 333 extern int nfs4_proc_get_lease_time(struct nfs_client *clp, 348 extern int nfs4_detect_session_trunking(struct nfs_client *clp, 352 is_ds_only_client(struct nfs_client *clp) in is_ds_only_client() argument 354 return (clp->cl_exchange_flags & EXCHGID4_FLAG_MASK_PNFS) == in is_ds_only_client() 359 is_ds_client(struct nfs_client *clp) in is_ds_client() argument 361 return clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_DS; in is_ds_client() 365 _nfs4_state_protect(struct nfs_client *clp, unsigned long sp4_mode, in _nfs4_state_protect() argument [all …]
|
D | delegation.h | 51 struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle); 53 void nfs_expire_all_delegations(struct nfs_client *clp); 54 void nfs_expire_unused_delegation_types(struct nfs_client *clp, fmode_t flags); 55 void nfs_expire_unreferenced_delegations(struct nfs_client *clp); 56 int nfs_client_return_marked_delegations(struct nfs_client *clp); 57 int nfs_delegations_present(struct nfs_client *clp); 61 void nfs_delegation_mark_reclaim(struct nfs_client *clp); 62 void nfs_delegation_reap_unclaimed(struct nfs_client *clp); 64 void nfs_mark_test_expired_all_delegations(struct nfs_client *clp); 65 void nfs_test_expired_all_delegations(struct nfs_client *clp); [all …]
|
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 …]
|
D | pnfs_nfs.c | 853 struct nfs_client *clp = ERR_PTR(-EIO); in _nfs4_pnfs_v3_ds_connect() local 867 if (!IS_ERR(clp)) { in _nfs4_pnfs_v3_ds_connect() 870 .net = clp->cl_net, in _nfs4_pnfs_v3_ds_connect() 873 .servername = clp->cl_hostname, in _nfs4_pnfs_v3_ds_connect() 878 if (da->da_transport != clp->cl_proto) in _nfs4_pnfs_v3_ds_connect() 880 if (da->da_addr.ss_family != clp->cl_addr.ss_family) in _nfs4_pnfs_v3_ds_connect() 883 rpc_clnt_add_xprt(clp->cl_rpcclient, &xprt_args, in _nfs4_pnfs_v3_ds_connect() 887 clp = get_v3_ds_connect(mds_srv, in _nfs4_pnfs_v3_ds_connect() 891 if (IS_ERR(clp)) in _nfs4_pnfs_v3_ds_connect() 893 clp->cl_rpcclient->cl_softerr = 0; in _nfs4_pnfs_v3_ds_connect() [all …]
|
D | sysfs.c | 197 struct nfs_netns_client *clp; in nfs_netns_sysfs_setup() local 199 clp = nfs_netns_client_alloc(&nfs_kset->kobj, net); in nfs_netns_sysfs_setup() 200 if (clp) { in nfs_netns_sysfs_setup() 201 netns->nfs_client = clp; in nfs_netns_sysfs_setup() 202 kobject_uevent(&clp->kobject, KOBJ_ADD); in nfs_netns_sysfs_setup() 208 struct nfs_netns_client *clp = netns->nfs_client; in nfs_netns_sysfs_destroy() local 210 if (clp) { in nfs_netns_sysfs_destroy() 211 kobject_uevent(&clp->kobject, KOBJ_REMOVE); in nfs_netns_sysfs_destroy() 212 kobject_del(&clp->kobject); in nfs_netns_sysfs_destroy() 213 kobject_put(&clp->kobject); in nfs_netns_sysfs_destroy() [all …]
|
D | nfs4proc.c | 102 static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, 471 struct nfs_client *clp = server->nfs_client; in nfs4_do_handle_exception() local 525 nfs4_schedule_lease_recovery(clp); in nfs4_do_handle_exception() 533 nfs4_schedule_lease_moved_recovery(clp); in nfs4_do_handle_exception() 593 struct nfs_client *clp = server->nfs_client; in nfs4_handle_exception() local 605 ret = nfs4_wait_clnt_recover(clp); in nfs4_handle_exception() 621 struct nfs_client *clp = server->nfs_client; in nfs4_async_handle_exception() local 632 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_exception() 633 if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) in nfs4_async_handle_exception() 634 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); in nfs4_async_handle_exception() [all …]
|
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() 232 const struct nfs_client *clp, const struct nfs4_deviceid *id) in nfs4_delete_deviceid() argument 238 d = _lookup_deviceid(ld, clp, id, nfs4_deviceid_hash(id)); in nfs4_delete_deviceid() 331 _deviceid_purge_client(const struct nfs_client *clp, long hash) in _deviceid_purge_client() argument 339 if (d->nfs_client == clp && atomic_read(&d->ref)) { in _deviceid_purge_client() 358 nfs4_deviceid_purge_client(const struct nfs_client *clp) in nfs4_deviceid_purge_client() argument 362 if (!(clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS)) in nfs4_deviceid_purge_client() 365 _deviceid_purge_client(clp, h); in nfs4_deviceid_purge_client() 372 nfs4_deviceid_mark_client_invalid(struct nfs_client *clp) in nfs4_deviceid_mark_client_invalid() argument [all …]
|
D | fscache.c | 46 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()
|
D | nfs4trace.h | 37 const struct nfs_client *clp, 41 TP_ARGS(clp, error), 44 __string(dstaddr, clp->cl_hostname) 50 __assign_str(dstaddr, clp->cl_hostname); 63 const struct nfs_client *clp, \ 66 TP_ARGS(clp, error)) 326 const struct nfs_client *clp 329 TP_ARGS(clp), 333 __string(hostname, clp->cl_hostname) 337 __entry->state = clp->cl_state; [all …]
|
D | nfs3client.c | 105 struct nfs_client *clp; in nfs3_set_ds_client() local 127 clp = nfs_get_client(&cl_init); in nfs3_set_ds_client() 129 return clp; in nfs3_set_ds_client()
|
/Linux-v6.6/fs/nfsd/ |
D | nfs4callback.c | 917 static void nfsd41_cb_inflight_begin(struct nfs4_client *clp) in nfsd41_cb_inflight_begin() argument 919 atomic_inc(&clp->cl_cb_inflight); in nfsd41_cb_inflight_begin() 922 static void nfsd41_cb_inflight_end(struct nfs4_client *clp) in nfsd41_cb_inflight_end() argument 925 if (atomic_dec_and_test(&clp->cl_cb_inflight)) in nfsd41_cb_inflight_end() 926 wake_up_var(&clp->cl_cb_inflight); in nfsd41_cb_inflight_end() 929 static void nfsd41_cb_inflight_wait_complete(struct nfs4_client *clp) in nfsd41_cb_inflight_wait_complete() argument 931 wait_var_event(&clp->cl_cb_inflight, in nfsd41_cb_inflight_wait_complete() 932 !atomic_read(&clp->cl_cb_inflight)); in nfsd41_cb_inflight_wait_complete() 935 static const struct cred *get_backchannel_cred(struct nfs4_client *clp, struct rpc_clnt *client, st… in get_backchannel_cred() argument 937 if (clp->cl_minorversion == 0) { in get_backchannel_cred() [all …]
|
D | nfs4state.c | 161 static bool is_client_expired(struct nfs4_client *clp) in is_client_expired() argument 163 return clp->cl_time == 0; in is_client_expired() 167 struct nfs4_client *clp) in nfsd4_dec_courtesy_client_count() argument 169 if (clp->cl_state != NFSD4_ACTIVE) in nfsd4_dec_courtesy_client_count() 173 static __be32 get_client_locked(struct nfs4_client *clp) in get_client_locked() argument 175 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in get_client_locked() 179 if (is_client_expired(clp)) in get_client_locked() 181 atomic_inc(&clp->cl_rpc_users); in get_client_locked() 182 nfsd4_dec_courtesy_client_count(nn, clp); in get_client_locked() 183 clp->cl_state = NFSD4_ACTIVE; in get_client_locked() [all …]
|
D | nfs4recover.c | 151 legacy_recdir_name_error(struct nfs4_client *clp, int error) in legacy_recdir_name_error() argument 164 nfsd4_client_tracking_exit(clp->net); in legacy_recdir_name_error() 169 __nfsd4_create_reclaim_record_grace(struct nfs4_client *clp, in __nfsd4_create_reclaim_record_grace() argument 188 crp->cr_clp = clp; in __nfsd4_create_reclaim_record_grace() 192 nfsd4_create_clid_dir(struct nfs4_client *clp) in nfsd4_create_clid_dir() argument 198 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in nfsd4_create_clid_dir() 200 if (test_and_set_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags)) in nfsd4_create_clid_dir() 205 status = nfs4_make_rec_clidname(dname, &clp->cl_name); in nfsd4_create_clid_dir() 207 return legacy_recdir_name_error(clp, status); in nfsd4_create_clid_dir() 243 __nfsd4_create_reclaim_record_grace(clp, dname, in nfsd4_create_clid_dir() [all …]
|
D | trace.h | 778 const struct nfs4_client *clp, 781 TP_ARGS(clp, rqstp), 790 __entry->cl_boot = clp->cl_clientid.cl_boot; 791 __entry->cl_id = clp->cl_clientid.cl_id; 792 __entry->cl_flavor = clp->cl_cred.cr_flavor; 807 const struct nfs4_client *clp, 811 TP_ARGS(clp, rqstp, verf), 820 __entry->cl_boot = clp->cl_clientid.cl_boot; 821 __entry->cl_id = clp->cl_clientid.cl_id; 822 memcpy(__entry->cl_verifier, (void *)&clp->cl_verifier, [all …]
|
D | nfs4layouts.c | 159 struct nfs4_client *clp = ls->ls_stid.sc_client; in nfsd4_free_layout_stateid() local 164 spin_lock(&clp->cl_lock); in nfsd4_free_layout_stateid() 166 spin_unlock(&clp->cl_lock); in nfsd4_free_layout_stateid() 216 struct nfs4_client *clp = cstate->clp; in nfsd4_alloc_layout_stateid() local 221 stp = nfs4_alloc_stid(cstate->clp, nfs4_layout_stateid_cache, in nfsd4_alloc_layout_stateid() 236 nfsd4_init_cb(&ls->ls_recall, clp, &nfsd4_cb_layout_ops, in nfsd4_alloc_layout_stateid() 252 spin_lock(&clp->cl_lock); in nfsd4_alloc_layout_stateid() 254 list_add(&ls->ls_perclnt, &clp->cl_lo_states); in nfsd4_alloc_layout_stateid() 255 spin_unlock(&clp->cl_lock); in nfsd4_alloc_layout_stateid() 538 struct nfs4_client *clp = cstate->clp; in nfsd4_return_client_layouts() local [all …]
|
D | blocklayout.c | 167 struct nfs4_client *clp, in nfsd4_block_proc_getdeviceinfo() argument 217 static u64 nfsd4_scsi_pr_key(struct nfs4_client *clp) in nfsd4_scsi_pr_key() argument 219 return ((u64)clp->cl_clientid.cl_boot << 32) | clp->cl_clientid.cl_id; in nfsd4_scsi_pr_key() 249 struct nfs4_client *clp, in nfsd4_block_get_device_info_scsi() argument 267 b->scsi.pr_key = nfsd4_scsi_pr_key(clp); in nfsd4_block_get_device_info_scsi() 307 struct nfs4_client *clp, in nfsd4_scsi_proc_getdeviceinfo() argument 312 return nfserrno(nfsd4_block_get_device_info_scsi(sb, clp, gdp)); in nfsd4_scsi_proc_getdeviceinfo() 332 struct nfs4_client *clp = ls->ls_stid.sc_client; in nfsd4_scsi_fence_client() local 336 nfsd4_scsi_pr_key(clp), 0, true); in nfsd4_scsi_fence_client()
|
D | state.h | 693 extern void nfsd4_probe_callback(struct nfs4_client *clp); 694 extern void nfsd4_probe_callback_sync(struct nfs4_client *clp); 695 extern void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *); 696 extern void nfsd4_init_cb(struct nfsd4_callback *cb, struct nfs4_client *clp, 702 extern void nfsd4_shutdown_copy(struct nfs4_client *clp); 711 struct nfs4_client *clp, 725 extern void nfsd4_client_record_create(struct nfs4_client *clp); 726 extern void nfsd4_client_record_remove(struct nfs4_client *clp); 727 extern int nfsd4_client_record_check(struct nfs4_client *clp); 730 static inline bool try_to_expire_client(struct nfs4_client *clp) in try_to_expire_client() argument [all …]
|
D | pnfs.h | 27 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
|