Lines Matching full:delegation
60 #include "delegation.h"
1319 /* Want no delegation if we're using O_DIRECT */ in nfs4_map_atomic_open_share()
1530 static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode, in can_open_delegated() argument
1533 if (delegation == NULL) in can_open_delegated()
1535 if ((delegation->type & fmode) != fmode) in can_open_delegated()
1542 if (!test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags)) in can_open_delegated()
1548 nfs_mark_delegation_referenced(delegation); in can_open_delegated()
1803 const nfs4_stateid *delegation, in update_open_stateid() argument
1827 if (rcu_dereference(nfsi->delegation) != deleg_cur || in update_open_stateid()
1832 if (delegation == NULL) in update_open_stateid()
1833 delegation = &deleg_cur->stateid; in update_open_stateid()
1834 else if (!nfs4_stateid_match_other(&deleg_cur->stateid, delegation)) in update_open_stateid()
1877 struct nfs_delegation *delegation; in nfs4_return_incompatible_delegation() local
1881 delegation = nfs4_get_valid_delegation(inode); in nfs4_return_incompatible_delegation()
1882 if (delegation == NULL || (delegation->type & fmode) == fmode) { in nfs4_return_incompatible_delegation()
1893 struct nfs_delegation *delegation; in nfs4_try_open_cached() local
1909 delegation = nfs4_get_valid_delegation(state->inode); in nfs4_try_open_cached()
1910 if (!can_open_delegated(delegation, fmode, claim)) { in nfs4_try_open_cached()
1914 /* Save the delegation */ in nfs4_try_open_cached()
1915 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs4_try_open_cached()
1925 /* Try to update the stateid using the delegation */ in nfs4_try_open_cached()
1940 struct nfs_delegation *delegation; in nfs4_opendata_check_deleg() local
1944 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs4_opendata_check_deleg()
1945 if (delegation) in nfs4_opendata_check_deleg()
1946 delegation_flags = delegation->flags; in nfs4_opendata_check_deleg()
1954 "returning a delegation for " in nfs4_opendata_check_deleg()
1963 &data->o_res.delegation, in nfs4_opendata_check_deleg()
1969 &data->o_res.delegation, in nfs4_opendata_check_deleg()
1974 &data->o_res.delegation); in nfs4_opendata_check_deleg()
2203 struct nfs_delegation *delegation; in _nfs4_do_open_reclaim() local
2213 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in _nfs4_do_open_reclaim()
2214 if (delegation != NULL && test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags) != 0) in _nfs4_do_open_reclaim()
2215 delegation_type = delegation->type; in _nfs4_do_open_reclaim()
2276 /* Don't recall a delegation if it was lost */ in nfs4_handle_delegation_recall_error()
2321 nfs4_stateid_copy(&opendata->o_arg.u.delegation, stateid); in nfs4_open_delegation_recall()
2443 * a delegation instead. in nfs4_open_prepare()
2446 struct nfs_delegation *delegation; in nfs4_open_prepare() local
2452 delegation = nfs4_get_valid_delegation(data->state->inode); in nfs4_open_prepare()
2453 if (can_open_delegated(delegation, data->o_arg.fmode, claim)) in nfs4_open_prepare()
2739 * We're not recovering a delegation, so ask for no delegation. in _nfs4_open_expired()
2741 * delegation return. in _nfs4_open_expired()
2797 if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL) in nfs40_clear_delegation_stateid()
2803 /* NFSv4.0 doesn't allow for delegation recovery on open expire */ in nfs40_open_expired()
2852 struct nfs_delegation *delegation; in nfs41_check_delegation_stateid() local
2856 /* Get the delegation credential for use by test/free_stateid */ in nfs41_check_delegation_stateid()
2858 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs41_check_delegation_stateid()
2859 if (delegation == NULL) { in nfs41_check_delegation_stateid()
2865 spin_lock(&delegation->lock); in nfs41_check_delegation_stateid()
2866 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs41_check_delegation_stateid()
2869 &delegation->flags)) { in nfs41_check_delegation_stateid()
2870 spin_unlock(&delegation->lock); in nfs41_check_delegation_stateid()
2875 if (delegation->cred) in nfs41_check_delegation_stateid()
2876 cred = get_cred(delegation->cred); in nfs41_check_delegation_stateid()
2877 spin_unlock(&delegation->lock); in nfs41_check_delegation_stateid()
3290 /* We must have found a delegation */ in nfs4_do_open()
5594 * a delegation in nfs4_write_need_cache_consistency_data()
7427 /* ...but avoid races with delegation recall... */ in _nfs4_proc_setlk()
7626 /* No delegation, no lease */ in nfs4_add_lease()
7632 /* We raced with a delegation return */ in nfs4_add_lease()