Lines Matching full:delegation

60 #include "delegation.h"
1340 /* Want no delegation if we're using O_DIRECT */ in nfs4_map_atomic_open_share()
1551 static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode, in can_open_delegated() argument
1554 if (delegation == NULL) in can_open_delegated()
1556 if ((delegation->type & fmode) != fmode) in can_open_delegated()
1563 if (!test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags)) in can_open_delegated()
1569 nfs_mark_delegation_referenced(delegation); in can_open_delegated()
1823 const nfs4_stateid *delegation, in update_open_stateid() argument
1847 if (rcu_dereference(nfsi->delegation) != deleg_cur || in update_open_stateid()
1852 if (delegation == NULL) in update_open_stateid()
1853 delegation = &deleg_cur->stateid; in update_open_stateid()
1854 else if (!nfs4_stateid_match_other(&deleg_cur->stateid, delegation)) in update_open_stateid()
1897 struct nfs_delegation *delegation; in nfs4_return_incompatible_delegation() local
1901 delegation = nfs4_get_valid_delegation(inode); in nfs4_return_incompatible_delegation()
1902 if (delegation == NULL || (delegation->type & fmode) == fmode) { in nfs4_return_incompatible_delegation()
1913 struct nfs_delegation *delegation; in nfs4_try_open_cached() local
1929 delegation = nfs4_get_valid_delegation(state->inode); in nfs4_try_open_cached()
1930 if (!can_open_delegated(delegation, fmode, claim)) { in nfs4_try_open_cached()
1934 /* Save the delegation */ in nfs4_try_open_cached()
1935 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs4_try_open_cached()
1945 /* Try to update the stateid using the delegation */ in nfs4_try_open_cached()
1960 struct nfs_delegation *delegation; in nfs4_opendata_check_deleg() local
1964 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs4_opendata_check_deleg()
1965 if (delegation) in nfs4_opendata_check_deleg()
1966 delegation_flags = delegation->flags; in nfs4_opendata_check_deleg()
1974 "returning a delegation for " in nfs4_opendata_check_deleg()
1983 &data->o_res.delegation, in nfs4_opendata_check_deleg()
1989 &data->o_res.delegation, in nfs4_opendata_check_deleg()
1994 &data->o_res.delegation); in nfs4_opendata_check_deleg()
2223 struct nfs_delegation *delegation; in _nfs4_do_open_reclaim() local
2233 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in _nfs4_do_open_reclaim()
2234 if (delegation != NULL && test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags) != 0) in _nfs4_do_open_reclaim()
2235 delegation_type = delegation->type; in _nfs4_do_open_reclaim()
2296 /* Don't recall a delegation if it was lost */ in nfs4_handle_delegation_recall_error()
2341 nfs4_stateid_copy(&opendata->o_arg.u.delegation, stateid); in nfs4_open_delegation_recall()
2463 * a delegation instead. in nfs4_open_prepare()
2466 struct nfs_delegation *delegation; in nfs4_open_prepare() local
2472 delegation = nfs4_get_valid_delegation(data->state->inode); in nfs4_open_prepare()
2473 if (can_open_delegated(delegation, data->o_arg.fmode, claim)) in nfs4_open_prepare()
2757 * We're not recovering a delegation, so ask for no delegation. in _nfs4_open_expired()
2759 * delegation return. in _nfs4_open_expired()
2815 if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL) in nfs40_clear_delegation_stateid()
2821 /* NFSv4.0 doesn't allow for delegation recovery on open expire */ in nfs40_open_expired()
2870 struct nfs_delegation *delegation; in nfs41_check_delegation_stateid() local
2874 /* Get the delegation credential for use by test/free_stateid */ in nfs41_check_delegation_stateid()
2876 delegation = rcu_dereference(NFS_I(state->inode)->delegation); in nfs41_check_delegation_stateid()
2877 if (delegation == NULL) { in nfs41_check_delegation_stateid()
2883 spin_lock(&delegation->lock); in nfs41_check_delegation_stateid()
2884 nfs4_stateid_copy(&stateid, &delegation->stateid); in nfs41_check_delegation_stateid()
2887 &delegation->flags)) { in nfs41_check_delegation_stateid()
2888 spin_unlock(&delegation->lock); in nfs41_check_delegation_stateid()
2893 if (delegation->cred) in nfs41_check_delegation_stateid()
2894 cred = get_cred(delegation->cred); in nfs41_check_delegation_stateid()
2895 spin_unlock(&delegation->lock); in nfs41_check_delegation_stateid()
3308 /* We must have found a delegation */ in nfs4_do_open()
5592 * a delegation in nfs4_write_need_cache_consistency_data()
7412 /* ...but avoid races with delegation recall... */ in _nfs4_proc_setlk()
7611 /* No delegation, no lease */ in nfs4_add_lease()
7617 /* We raced with a delegation return */ in nfs4_add_lease()