/linux-4.4.14/fs/nfs/ |
H A D | delegation.c | 2 * linux/fs/nfs/delegation.c 6 * NFS file delegation management 21 #include "delegation.h" 25 static void nfs_free_delegation(struct nfs_delegation *delegation) nfs_free_delegation() argument 27 if (delegation->cred) { nfs_free_delegation() 28 put_rpccred(delegation->cred); nfs_free_delegation() 29 delegation->cred = NULL; nfs_free_delegation() 31 kfree_rcu(delegation, rcu); nfs_free_delegation() 35 * nfs_mark_delegation_referenced - set delegation's REFERENCED flag 36 * @delegation: delegation to process 39 void nfs_mark_delegation_referenced(struct nfs_delegation *delegation) nfs_mark_delegation_referenced() argument 41 set_bit(NFS_DELEGATION_REFERENCED, &delegation->flags); nfs_mark_delegation_referenced() 47 struct nfs_delegation *delegation; nfs4_do_check_delegation() local 52 delegation = rcu_dereference(NFS_I(inode)->delegation); nfs4_do_check_delegation() 53 if (delegation != NULL && (delegation->type & flags) == flags && nfs4_do_check_delegation() 54 !test_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) { nfs4_do_check_delegation() 56 nfs_mark_delegation_referenced(delegation); nfs4_do_check_delegation() 63 * nfs_have_delegation - check if inode has a delegation, mark it 66 * @flags: delegation types to check for 68 * Returns one if inode has the indicated delegation, otherwise zero. 76 * nfs4_check_delegation - check if inode has a delegation, do not mark 160 * nfs_inode_reclaim_delegation - process a delegation reclaim request 163 * @res: new delegation state from server 169 struct nfs_delegation *delegation; nfs_inode_reclaim_delegation() local 173 delegation = rcu_dereference(NFS_I(inode)->delegation); nfs_inode_reclaim_delegation() 174 if (delegation != NULL) { nfs_inode_reclaim_delegation() 175 spin_lock(&delegation->lock); nfs_inode_reclaim_delegation() 176 if (delegation->inode != NULL) { nfs_inode_reclaim_delegation() 177 nfs4_stateid_copy(&delegation->stateid, &res->delegation); nfs_inode_reclaim_delegation() 178 delegation->type = res->delegation_type; nfs_inode_reclaim_delegation() 179 delegation->pagemod_limit = res->pagemod_limit; nfs_inode_reclaim_delegation() 180 oldcred = delegation->cred; nfs_inode_reclaim_delegation() 181 delegation->cred = get_rpccred(cred); nfs_inode_reclaim_delegation() 183 &delegation->flags); nfs_inode_reclaim_delegation() 184 spin_unlock(&delegation->lock); nfs_inode_reclaim_delegation() 189 /* We appear to have raced with a delegation return. */ nfs_inode_reclaim_delegation() 190 spin_unlock(&delegation->lock); nfs_inode_reclaim_delegation() 199 static int nfs_do_return_delegation(struct inode *inode, struct nfs_delegation *delegation, int issync) nfs_do_return_delegation() argument 203 if (!test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) nfs_do_return_delegation() 205 delegation->cred, nfs_do_return_delegation() 206 &delegation->stateid, nfs_do_return_delegation() 208 nfs_free_delegation(delegation); nfs_do_return_delegation() 212 static struct inode *nfs_delegation_grab_inode(struct nfs_delegation *delegation) nfs_delegation_grab_inode() argument 216 spin_lock(&delegation->lock); nfs_delegation_grab_inode() 217 if (delegation->inode != NULL) nfs_delegation_grab_inode() 218 inode = igrab(delegation->inode); nfs_delegation_grab_inode() 219 spin_unlock(&delegation->lock); nfs_delegation_grab_inode() 227 struct nfs_delegation *delegation = rcu_dereference(nfsi->delegation); nfs_start_delegation_return_locked() local 229 if (delegation == NULL) nfs_start_delegation_return_locked() 231 spin_lock(&delegation->lock); nfs_start_delegation_return_locked() 232 if (!test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) nfs_start_delegation_return_locked() 233 ret = delegation; nfs_start_delegation_return_locked() 234 spin_unlock(&delegation->lock); nfs_start_delegation_return_locked() 242 struct nfs_delegation *delegation; nfs_start_delegation_return() local 245 delegation = nfs_start_delegation_return_locked(nfsi); nfs_start_delegation_return() 247 return delegation; nfs_start_delegation_return() 251 nfs_abort_delegation_return(struct nfs_delegation *delegation, nfs_abort_delegation_return() argument 255 spin_lock(&delegation->lock); nfs_abort_delegation_return() 256 clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags); nfs_abort_delegation_return() 257 set_bit(NFS_DELEGATION_RETURN, &delegation->flags); nfs_abort_delegation_return() 258 spin_unlock(&delegation->lock); nfs_abort_delegation_return() 264 struct nfs_delegation *delegation, nfs_detach_delegation_locked() 268 rcu_dereference_protected(nfsi->delegation, nfs_detach_delegation_locked() 271 if (deleg_cur == NULL || delegation != deleg_cur) nfs_detach_delegation_locked() 274 spin_lock(&delegation->lock); nfs_detach_delegation_locked() 275 set_bit(NFS_DELEGATION_RETURNING, &delegation->flags); nfs_detach_delegation_locked() 276 list_del_rcu(&delegation->super_list); nfs_detach_delegation_locked() 277 delegation->inode = NULL; nfs_detach_delegation_locked() 278 rcu_assign_pointer(nfsi->delegation, NULL); nfs_detach_delegation_locked() 279 spin_unlock(&delegation->lock); nfs_detach_delegation_locked() 280 return delegation; nfs_detach_delegation_locked() 284 struct nfs_delegation *delegation, nfs_detach_delegation() 290 delegation = nfs_detach_delegation_locked(nfsi, delegation, clp); nfs_detach_delegation() 292 return delegation; nfs_detach_delegation() 300 struct nfs_delegation *delegation; nfs_inode_detach_delegation() local 302 delegation = nfs_start_delegation_return(nfsi); nfs_inode_detach_delegation() 303 if (delegation == NULL) nfs_inode_detach_delegation() 305 return nfs_detach_delegation(nfsi, delegation, server); nfs_inode_detach_delegation() 309 nfs_update_inplace_delegation(struct nfs_delegation *delegation, nfs_update_inplace_delegation() argument 312 if (nfs4_stateid_is_newer(&update->stateid, &delegation->stateid)) { nfs_update_inplace_delegation() 313 delegation->stateid.seqid = update->stateid.seqid; nfs_update_inplace_delegation() 315 delegation->type = update->type; nfs_update_inplace_delegation() 320 * nfs_inode_set_delegation - set up a delegation on an inode 321 * @inode: inode to which delegation applies 322 * @cred: cred to use for subsequent delegation processing 323 * @res: new delegation state from server 332 struct nfs_delegation *delegation, *old_delegation; nfs_inode_set_delegation() local 336 delegation = kmalloc(sizeof(*delegation), GFP_NOFS); nfs_inode_set_delegation() 337 if (delegation == NULL) nfs_inode_set_delegation() 339 nfs4_stateid_copy(&delegation->stateid, &res->delegation); nfs_inode_set_delegation() 340 delegation->type = res->delegation_type; nfs_inode_set_delegation() 341 delegation->pagemod_limit = res->pagemod_limit; nfs_inode_set_delegation() 342 delegation->change_attr = inode->i_version; nfs_inode_set_delegation() 343 delegation->cred = get_rpccred(cred); nfs_inode_set_delegation() 344 delegation->inode = inode; nfs_inode_set_delegation() 345 delegation->flags = 1<<NFS_DELEGATION_REFERENCED; nfs_inode_set_delegation() 346 spin_lock_init(&delegation->lock); nfs_inode_set_delegation() 349 old_delegation = rcu_dereference_protected(nfsi->delegation, nfs_inode_set_delegation() 352 /* Is this an update of the existing delegation? */ nfs_inode_set_delegation() 354 &delegation->stateid)) { nfs_inode_set_delegation() 356 delegation); nfs_inode_set_delegation() 362 * Allow for upgrades to a WRITE delegation, but nfs_inode_set_delegation() 366 "a duplicate delegation!\n", nfs_inode_set_delegation() 368 if (delegation->type == old_delegation->type || nfs_inode_set_delegation() 369 !(delegation->type & FMODE_WRITE)) { nfs_inode_set_delegation() 370 freeme = delegation; nfs_inode_set_delegation() 371 delegation = NULL; nfs_inode_set_delegation() 382 list_add_tail_rcu(&delegation->super_list, &server->delegations); nfs_inode_set_delegation() 383 rcu_assign_pointer(nfsi->delegation, delegation); nfs_inode_set_delegation() 384 delegation = NULL; nfs_inode_set_delegation() 394 if (delegation != NULL) nfs_inode_set_delegation() 395 nfs_free_delegation(delegation); nfs_inode_set_delegation() 402 * Basic procedure for returning a delegation to the server 404 static int nfs_end_delegation_return(struct inode *inode, struct nfs_delegation *delegation, int issync) nfs_end_delegation_return() argument 410 if (delegation == NULL) nfs_end_delegation_return() 413 if (test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) nfs_end_delegation_return() 415 err = nfs_delegation_claim_opens(inode, &delegation->stateid, nfs_end_delegation_return() 416 delegation->type); nfs_end_delegation_return() 426 nfs_abort_delegation_return(delegation, clp); nfs_end_delegation_return() 429 if (!nfs_detach_delegation(nfsi, delegation, NFS_SERVER(inode))) nfs_end_delegation_return() 432 err = nfs_do_return_delegation(inode, delegation, issync); nfs_end_delegation_return() 437 static bool nfs_delegation_need_return(struct nfs_delegation *delegation) nfs_delegation_need_return() argument 441 if (test_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) nfs_delegation_need_return() 443 if (test_and_clear_bit(NFS_DELEGATION_RETURN, &delegation->flags)) nfs_delegation_need_return() 445 if (test_and_clear_bit(NFS_DELEGATION_RETURN_IF_CLOSED, &delegation->flags) && !ret) { nfs_delegation_need_return() 448 spin_lock(&delegation->lock); nfs_delegation_need_return() 449 inode = delegation->inode; nfs_delegation_need_return() 452 spin_unlock(&delegation->lock); nfs_delegation_need_return() 470 struct nfs_delegation *delegation; nfs_client_return_marked_delegations() local 478 list_for_each_entry_rcu(delegation, &server->delegations, nfs_client_return_marked_delegations() 480 if (!nfs_delegation_need_return(delegation)) nfs_client_return_marked_delegations() 484 inode = nfs_delegation_grab_inode(delegation); nfs_client_return_marked_delegations() 490 delegation = nfs_start_delegation_return_locked(NFS_I(inode)); nfs_client_return_marked_delegations() 493 err = nfs_end_delegation_return(inode, delegation, 0); nfs_client_return_marked_delegations() 507 * nfs_inode_return_delegation_noreclaim - return delegation, don't reclaim opens 510 * Does not protect against delegation reclaims, therefore really only safe 515 struct nfs_delegation *delegation; nfs_inode_return_delegation_noreclaim() local 517 delegation = nfs_inode_detach_delegation(inode); nfs_inode_return_delegation_noreclaim() 518 if (delegation != NULL) nfs_inode_return_delegation_noreclaim() 519 nfs_do_return_delegation(inode, delegation, 1); nfs_inode_return_delegation_noreclaim() 523 * nfs_inode_return_delegation - synchronously return a delegation 527 * assumption that if we need to return the delegation, then 535 struct nfs_delegation *delegation; nfs4_inode_return_delegation() local 539 delegation = nfs_start_delegation_return(nfsi); nfs4_inode_return_delegation() 540 if (delegation != NULL) nfs4_inode_return_delegation() 541 err = nfs_end_delegation_return(inode, delegation, 1); nfs4_inode_return_delegation() 546 struct nfs_delegation *delegation) nfs_mark_return_if_closed_delegation() 548 set_bit(NFS_DELEGATION_RETURN_IF_CLOSED, &delegation->flags); nfs_mark_return_if_closed_delegation() 553 struct nfs_delegation *delegation) nfs_mark_return_delegation() 555 set_bit(NFS_DELEGATION_RETURN, &delegation->flags); nfs_mark_return_delegation() 561 struct nfs_delegation *delegation; nfs_server_mark_return_all_delegations() local 564 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { nfs_server_mark_return_all_delegations() 565 nfs_mark_return_delegation(server, delegation); nfs_server_mark_return_all_delegations() 624 struct nfs_delegation *delegation; nfs_mark_return_unused_delegation_types() local 626 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { nfs_mark_return_unused_delegation_types() 627 if ((delegation->type == (FMODE_READ|FMODE_WRITE)) && !(flags & FMODE_WRITE)) nfs_mark_return_unused_delegation_types() 629 if (delegation->type & flags) nfs_mark_return_unused_delegation_types() 630 nfs_mark_return_if_closed_delegation(server, delegation); nfs_mark_return_unused_delegation_types() 647 struct nfs_delegation *delegation; nfs_revoke_delegation() local 649 delegation = rcu_dereference(NFS_I(inode)->delegation); nfs_revoke_delegation() 650 if (delegation != NULL) { nfs_revoke_delegation() 651 set_bit(NFS_DELEGATION_REVOKED, &delegation->flags); nfs_revoke_delegation() 652 nfs_mark_return_delegation(NFS_SERVER(inode), delegation); nfs_revoke_delegation() local 659 struct nfs_delegation *delegation; nfs_remove_bad_delegation() local 662 delegation = nfs_inode_detach_delegation(inode); nfs_remove_bad_delegation() 663 if (delegation) { nfs_remove_bad_delegation() 664 nfs_inode_find_state_and_recover(inode, &delegation->stateid); nfs_remove_bad_delegation() 665 nfs_free_delegation(delegation); nfs_remove_bad_delegation() 673 * @flags: delegation types to expire 684 struct nfs_delegation *delegation; nfs_mark_return_unreferenced_delegations() local 686 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { nfs_mark_return_unreferenced_delegations() 687 if (test_and_clear_bit(NFS_DELEGATION_REFERENCED, &delegation->flags)) nfs_mark_return_unreferenced_delegations() 689 nfs_mark_return_if_closed_delegation(server, delegation); nfs_mark_return_unreferenced_delegations() 711 * nfs_async_inode_return_delegation - asynchronously return a delegation 722 struct nfs_delegation *delegation; nfs_async_inode_return_delegation() local 725 delegation = rcu_dereference(NFS_I(inode)->delegation); nfs_async_inode_return_delegation() 726 if (delegation == NULL) nfs_async_inode_return_delegation() 729 !clp->cl_mvops->match_stateid(&delegation->stateid, stateid)) nfs_async_inode_return_delegation() 731 nfs_mark_return_delegation(server, delegation); nfs_async_inode_return_delegation() 745 struct nfs_delegation *delegation; nfs_delegation_find_inode_server() local 748 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { nfs_delegation_find_inode_server() 749 spin_lock(&delegation->lock); nfs_delegation_find_inode_server() 750 if (delegation->inode != NULL && nfs_delegation_find_inode_server() 751 nfs_compare_fh(fhandle, &NFS_I(delegation->inode)->fh) == 0) { nfs_delegation_find_inode_server() 752 res = igrab(delegation->inode); nfs_delegation_find_inode_server() 754 spin_unlock(&delegation->lock); nfs_delegation_find_inode_server() 762 * nfs_delegation_find_inode - retrieve the inode associated with a delegation 764 * @fhandle: filehandle from a delegation recall 787 struct nfs_delegation *delegation; nfs_delegation_mark_reclaim_server() local 789 list_for_each_entry_rcu(delegation, &server->delegations, super_list) nfs_delegation_mark_reclaim_server() 790 set_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags); nfs_delegation_mark_reclaim_server() 815 struct nfs_delegation *delegation; nfs_delegation_reap_unclaimed() local 822 list_for_each_entry_rcu(delegation, &server->delegations, nfs_delegation_reap_unclaimed() 825 &delegation->flags)) nfs_delegation_reap_unclaimed() 828 &delegation->flags) == 0) nfs_delegation_reap_unclaimed() 832 inode = nfs_delegation_grab_inode(delegation); nfs_delegation_reap_unclaimed() 838 delegation = nfs_start_delegation_return_locked(NFS_I(inode)); nfs_delegation_reap_unclaimed() 840 if (delegation != NULL) { nfs_delegation_reap_unclaimed() 841 delegation = nfs_detach_delegation(NFS_I(inode), nfs_delegation_reap_unclaimed() 842 delegation, server); nfs_delegation_reap_unclaimed() 843 if (delegation != NULL) nfs_delegation_reap_unclaimed() 844 nfs_free_delegation(delegation); nfs_delegation_reap_unclaimed() 880 * @flags: delegation type requirement 882 * Returns "true" and fills in "dst->data" * if inode had a delegation, 889 struct nfs_delegation *delegation; nfs4_copy_delegation_stateid() local 894 delegation = rcu_dereference(nfsi->delegation); nfs4_copy_delegation_stateid() 895 ret = (delegation != NULL && (delegation->type & flags) == flags); nfs4_copy_delegation_stateid() 897 nfs4_stateid_copy(dst, &delegation->stateid); nfs4_copy_delegation_stateid() 898 nfs_mark_delegation_referenced(delegation); nfs4_copy_delegation_stateid() 909 * against the delegation 'space_limit' field to see if 915 struct nfs_delegation *delegation; nfs4_delegation_flush_on_close() local 919 delegation = rcu_dereference(nfsi->delegation); nfs4_delegation_flush_on_close() 920 if (delegation == NULL || !(delegation->type & FMODE_WRITE)) nfs4_delegation_flush_on_close() 922 if (nfsi->nrequests < delegation->pagemod_limit) nfs4_delegation_flush_on_close() 263 nfs_detach_delegation_locked(struct nfs_inode *nfsi, struct nfs_delegation *delegation, struct nfs_client *clp) nfs_detach_delegation_locked() argument 283 nfs_detach_delegation(struct nfs_inode *nfsi, struct nfs_delegation *delegation, struct nfs_server *server) nfs_detach_delegation() argument 545 nfs_mark_return_if_closed_delegation(struct nfs_server *server, struct nfs_delegation *delegation) nfs_mark_return_if_closed_delegation() argument 552 nfs_mark_return_delegation(struct nfs_server *server, struct nfs_delegation *delegation) nfs_mark_return_delegation() argument
|
H A D | delegation.h | 2 * linux/fs/nfs/delegation.h 13 * NFSv4 delegation 55 /* NFSv4 delegation-related procedures */ 61 void nfs_mark_delegation_referenced(struct nfs_delegation *delegation);
|
H A D | Makefile | 25 delegation.o nfs4idmap.o callback.o callback_xdr.o callback_proc.o \
|
H A D | callback_proc.c | 14 #include "delegation.h" 26 struct nfs_delegation *delegation; nfs4_callback_getattr() local 48 delegation = rcu_dereference(nfsi->delegation); nfs4_callback_getattr() 49 if (delegation == NULL || (delegation->type & FMODE_WRITE) == 0) nfs4_callback_getattr() 52 res->change_attr = delegation->change_attr; nfs4_callback_getattr() 88 /* Set up a helper thread to actually return the delegation */ nfs4_callback_recall()
|
H A D | nfs4proc.c | 60 #include "delegation.h" 1034 /* Want no delegation if we're using O_DIRECT */ nfs4_map_atomic_open_share() 1241 static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode, can_open_delegated() argument 1244 if (delegation == NULL) can_open_delegated() 1246 if ((delegation->type & fmode) != fmode) can_open_delegated() 1248 if (test_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) can_open_delegated() 1255 if (!test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags)) can_open_delegated() 1260 nfs_mark_delegation_referenced(delegation); can_open_delegated() 1401 static int update_open_stateid(struct nfs4_state *state, nfs4_stateid *open_stateid, nfs4_stateid *delegation, fmode_t fmode) update_open_stateid() argument 1410 deleg_cur = rcu_dereference(nfsi->delegation); update_open_stateid() 1415 if (rcu_dereference(nfsi->delegation) != deleg_cur || update_open_stateid() 1420 if (delegation == NULL) update_open_stateid() 1421 delegation = &deleg_cur->stateid; update_open_stateid() 1422 else if (!nfs4_stateid_match(&deleg_cur->stateid, delegation)) update_open_stateid() 1463 struct nfs_delegation *delegation; nfs4_return_incompatible_delegation() local 1466 delegation = rcu_dereference(NFS_I(inode)->delegation); nfs4_return_incompatible_delegation() 1467 if (delegation == NULL || (delegation->type & fmode) == fmode) { nfs4_return_incompatible_delegation() 1479 struct nfs_delegation *delegation; nfs4_try_open_cached() local 1495 delegation = rcu_dereference(nfsi->delegation); nfs4_try_open_cached() 1496 if (!can_open_delegated(delegation, fmode, claim)) { nfs4_try_open_cached() 1500 /* Save the delegation */ nfs4_try_open_cached() 1501 nfs4_stateid_copy(&stateid, &delegation->stateid); nfs4_try_open_cached() 1511 /* Try to update the stateid using the delegation */ nfs4_try_open_cached() 1526 struct nfs_delegation *delegation; nfs4_opendata_check_deleg() local 1530 delegation = rcu_dereference(NFS_I(state->inode)->delegation); nfs4_opendata_check_deleg() 1531 if (delegation) nfs4_opendata_check_deleg() 1532 delegation_flags = delegation->flags; nfs4_opendata_check_deleg() 1540 "returning a delegation for " nfs4_opendata_check_deleg() 1737 struct nfs_delegation *delegation; _nfs4_do_open_reclaim() local 1747 delegation = rcu_dereference(NFS_I(state->inode)->delegation); _nfs4_do_open_reclaim() 1748 if (delegation != NULL && test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags) != 0) _nfs4_do_open_reclaim() 1749 delegation_type = delegation->type; _nfs4_do_open_reclaim() 1810 /* Don't recall a delegation if it was lost */ nfs4_handle_delegation_recall_error() 1852 nfs4_stateid_copy(&opendata->o_arg.u.delegation, stateid); nfs4_open_delegation_recall() 1974 * a delegation instead. nfs4_open_prepare() 1977 struct nfs_delegation *delegation; nfs4_open_prepare() local 1982 delegation = rcu_dereference(NFS_I(data->state->inode)->delegation); nfs4_open_prepare() 1983 if (can_open_delegated(delegation, data->o_arg.fmode, claim)) nfs4_open_prepare() 2312 if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL) nfs40_clear_delegation_stateid() 2318 /* NFSv4.0 doesn't allow for delegation recovery on open expire */ nfs40_open_expired() 2328 struct nfs_delegation *delegation; nfs41_check_delegation_stateid() local 2332 /* Get the delegation credential for use by test/free_stateid */ nfs41_check_delegation_stateid() 2334 delegation = rcu_dereference(NFS_I(state->inode)->delegation); nfs41_check_delegation_stateid() 2335 if (delegation == NULL) { nfs41_check_delegation_stateid() 2340 nfs4_stateid_copy(&stateid, &delegation->stateid); nfs41_check_delegation_stateid() 2341 cred = get_rpccred(delegation->cred); nfs41_check_delegation_stateid() 2637 /* We must have found a delegation */ nfs4_do_open() 4440 * a delegation nfs4_write_need_cache_consistency_data() 6067 /* ...but avoid races with delegation recall... */ _nfs4_proc_setlk()
|
H A D | nfs4file.c | 11 #include "delegation.h" 121 * If we're holding a write delegation, then check if we're required nfs4_file_flush()
|
H A D | nfs4super.c | 8 #include "delegation.h" 94 /* If we are holding a delegation, return it! */ nfs4_evict_inode()
|
H A D | nfs4renewd.c | 50 #include "delegation.h"
|
H A D | nfs4_fs.h | 150 NFS_DELEGATED_STATE, /* Current stateid is delegation */ 173 nfs4_stateid stateid; /* Current stateid: may be delegation */
|
H A D | unlink.c | 22 #include "delegation.h" 534 /* Return delegation in anticipation of the rename */ nfs_sillyrename()
|
H A D | inode.c | 46 #include "delegation.h" 1498 * Don't revalidate the pagecache if we hold a delegation, but do nfs_post_op_update_inode_locked() 1909 nfsi->delegation = NULL; nfs4_init_once()
|
H A D | nfs4state.c | 57 #include "delegation.h" 995 /* returns true if delegation stateid found and copied */ nfs4_select_rw_stateid() 1397 /* Guard against delegation returns and new lock/unlock calls */ nfs4_reclaim_locks()
|
H A D | pnfs.c | 37 #include "delegation.h" 1088 /* no roc if we hold a delegation */ pnfs_roc()
|
H A D | client.c | 49 #include "delegation.h"
|
H A D | file.c | 34 #include "delegation.h"
|
H A D | nfs4client.c | 15 #include "delegation.h"
|
H A D | nfs4xdr.c | 1516 encode_claim_delegate_cur(xdr, arg->name, &arg->u.delegation); encode_open() 1522 encode_claim_delegate_cur_fh(xdr, &arg->u.delegation); encode_open() 5019 status = decode_stateid(xdr, &res->delegation); decode_rw_delegation()
|
H A D | dir.c | 41 #include "delegation.h"
|
H A D | super.c | 62 #include "delegation.h"
|
H A D | write.c | 27 #include "delegation.h"
|
/linux-4.4.14/fs/ |
H A D | attr.c | 178 * If notify_change discovers a delegation in need of breaking, 180 * delegated_inode. The caller should then break the delegation and 181 * retry. Because breaking a delegation may take a long time, the 187 * the file open for write, as there can be no conflicting delegation in
|
H A D | namei.c | 3771 * If vfs_unlink discovers a delegation, it will return -EWOULDBLOCK and 3773 * should then break the delegation on that inode and retry. Because 3774 * breaking a delegation may take a long time, the caller should drop 3978 * @delegated_inode: returns inode needing a delegation break 3982 * If vfs_link discovers a delegation on the to-be-linked file in need 3984 * inode in delegated_inode. The caller should then break the delegation 3985 * and retry. Because breaking a delegation may take a long time, the 4131 * @delegated_inode: returns an inode needing a delegation break 4136 * If vfs_rename discovers a delegation in need of breaking at either 4139 * break the delegation and retry. Because breaking a delegation may
|
H A D | locks.c | 1620 * In the delegation case we need mutual exclusion with generic_add_lease() 1625 * hand out a delegation on. generic_add_lease()
|
/linux-4.4.14/fs/nfsd/ |
H A D | state.h | 106 * Represents a delegation stateid. The nfs4_client holds references to these 107 * and they are put when it is being destroyed or when the delegation is 110 * o 1 reference as long as a delegation is still in force (taken when it's 117 * with that delegation without holding the cl_lock 119 * If the server attempts to recall a delegation and the client doesn't do so 120 * before a timeout, the server may also revoke the delegation. In that case, 130 struct list_head dl_recall_lru; /* delegation recalled */ 142 /* client delegation callback info */ 462 * on a file from a particular client.'od' stands for 'open & delegation'
|
H A D | nfs4state.c | 477 * Allocate a new open/delegation state counter. This is needed for 616 * When we recall a delegation, we should be careful not to hand it 620 * If a filehandle appear in either filter, a delegation is blocked. 621 * When a delegation is recalled, the filehandle is stored in the "new" 710 * delegation seqid's are never incremented. The 4.1 special alloc_init_deleg() 782 * nfs4_get_existing_delegation - Discover if this delegation already exists 783 * @clp: a pointer to the nfs4_client we're granting a delegation to 784 * @fp: a pointer to the nfs4_file we're granting a delegation on 787 * On success: NULL if an existing delegation was not found. 813 * hash_delegation_locked - Add a delegation to the appropriate lists 815 * @fp: a pointer to the nfs4_file we're granting a delegation on 818 * On success: NULL if the delegation was successfully hashed. 3632 * granting delegation. nfsd4_cb_recall_done() 3688 * we'll remove it ourself if a delegation isn't returned nfsd_break_deleg_cb() 4037 * nfs4_setlease - Obtain a delegation by requesting lease from vfs layer 4043 * On error: -EAGAIN if there was an existing delegation. 4173 * Attempt to hand out a delegation. 4229 dprintk("NFSD: delegation stateid=" STATEID_FMT "\n", nfs4_open_delegation() 4238 dprintk("NFSD: WARNING: refusing delegation reclaim\n"); nfs4_open_delegation() 4242 /* 4.1 client asking for a delegation? */ nfs4_open_delegation() 4260 /* Otherwise the client must be confused wanting a delegation nfsd4_deleg_xgrade_none_ext() 4351 * Attempt to hand out a delegation. No error return, because the nfsd4_process_open2() 4361 /* 4.1 client trying to upgrade/downgrade delegation? */ nfsd4_process_open2() 6585 * so we can now reset the dl_time back to 0. If a delegation list_for_each_entry_safe() 6645 * Since the lifetime of a delegation isn't limited to that of an open, a 6646 * client may quite reasonably hang on to a delegation as long as it has 6658 * estimates suggest that in the worst case (where every delegation set_max_delegations() 6659 * is for a different inode), a delegation could take about 1.5K, set_max_delegations()
|
H A D | nfs4proc.c | 291 * a chance to an acquire a delegation if appropriate. do_open_lookup() 333 * In the delegation case, the client is telling us about an do_open_fhandle()
|
H A D | vfs.c | 212 * subsequent open and delegation acquisition which may nfsd_lookup_dentry()
|
/linux-4.4.14/include/linux/ |
H A D | nfs_fs.h | 105 * NFSv4 delegation 182 struct nfs_delegation __rcu *delegation; member in struct:nfs_inode 206 #define NFS_INO_REVAL_FORCED 0x0040 /* force revalidation ignoring a delegation */
|
H A D | nfs4.h | 252 NFS4ERR_DIRDELEG_UNAVAIL = 10084, /* no directory delegation */
|
H A D | nfs_xdr.h | 406 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */ member in union:nfs_openargs::__anon13033 429 nfs4_stateid delegation; member in struct:nfs_openres
|
H A D | fs.h | 905 #define FL_DELEG 4 /* NFSv4 delegation */
|
/linux-4.4.14/security/apparmor/include/ |
H A D | file.h | 100 * also add delegation info.
|
/linux-4.4.14/fs/ceph/ |
H A D | inode.c | 179 * specified, copy the frag delegation info to the caller if 235 * Process dirfrag (delegation) info from the mds. Include leaf 258 /* no delegation info needed. */ ceph_fill_dirfrag() 279 /* find/add this frag to store mds delegation info */ ceph_fill_dirfrag() 283 with bad/inaccurate delegation info */ ceph_fill_dirfrag() 912 /* update delegation info? */ fill_inode()
|
H A D | super.h | 205 * delegation info. That is, if mds >= 0 || ndist > 0. 216 /* delegation and replication info */
|
/linux-4.4.14/drivers/usb/gadget/udc/ |
H A D | gr_udc.c | 903 * delegation. 961 * delegation. 995 * delegation. 1127 status = 1; /* Positive status flags delegation */
|
/linux-4.4.14/security/apparmor/ |
H A D | file.c | 291 * give a pass (implicit delegation) aa_path_perm()
|
H A D | lsm.c | 435 * delegation from unconfined tasks common_file_perm()
|
/linux-4.4.14/include/linux/ceph/ |
H A D | ceph_fs.h | 486 __le32 auth; /* auth mds, if this is a delegation point */
|
/linux-4.4.14/fs/nfs/filelayout/ |
H A D | filelayout.c | 41 #include "../delegation.h"
|
/linux-4.4.14/fs/nfs/flexfilelayout/ |
H A D | flexfilelayout.c | 19 #include "../delegation.h"
|
/linux-4.4.14/drivers/staging/lustre/lustre/include/lustre/ |
H A D | lustre_idl.h | 2368 * delegation, succeed if it's not
|