mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-26 11:47:31 +00:00
For the experimental NFSv4 client, make sure that attributes that
predate the issue of a delegation are not cached once the delegation is held. This is necessary, since cached attributes remain valid while the delegation is held. MFC after: 2 weeks
This commit is contained in:
parent
2a8d51200d
commit
86836fcf1f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=210034
@ -268,6 +268,14 @@ else printf(" fhl=0\n");
|
|||||||
#else
|
#else
|
||||||
NFSLOCKNODE(np);
|
NFSLOCKNODE(np);
|
||||||
np->n_flag &= ~NDELEGMOD;
|
np->n_flag &= ~NDELEGMOD;
|
||||||
|
/*
|
||||||
|
* Invalidate the attribute cache, so that
|
||||||
|
* attributes that pre-date the issue of a
|
||||||
|
* delegation are not cached, since the
|
||||||
|
* cached attributes will remain valid while
|
||||||
|
* the delegation is held.
|
||||||
|
*/
|
||||||
|
NFSINVALATTRCACHE(np);
|
||||||
NFSUNLOCKNODE(np);
|
NFSUNLOCKNODE(np);
|
||||||
#endif
|
#endif
|
||||||
(void) nfscl_deleg(nmp->nm_mountp,
|
(void) nfscl_deleg(nmp->nm_mountp,
|
||||||
@ -1724,6 +1732,12 @@ nfsrpc_create(vnode_t dvp, char *name, int namelen, struct vattr *vap,
|
|||||||
error = nfsrpc_createv4(dvp, name, namelen, vap, cverf, fmode,
|
error = nfsrpc_createv4(dvp, name, namelen, vap, cverf, fmode,
|
||||||
owp, &dp, cred, p, dnap, nnap, nfhpp, attrflagp, dattrflagp,
|
owp, &dp, cred, p, dnap, nnap, nfhpp, attrflagp, dattrflagp,
|
||||||
dstuff, &unlocked);
|
dstuff, &unlocked);
|
||||||
|
/*
|
||||||
|
* There is no need to invalidate cached attributes here,
|
||||||
|
* since new post-delegation issue attributes are always
|
||||||
|
* returned by nfsrpc_createv4() and these will update the
|
||||||
|
* attribute cache.
|
||||||
|
*/
|
||||||
if (dp != NULL)
|
if (dp != NULL)
|
||||||
(void) nfscl_deleg(nmp->nm_mountp, owp->nfsow_clp,
|
(void) nfscl_deleg(nmp->nm_mountp, owp->nfsow_clp,
|
||||||
(*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, &dp);
|
(*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, &dp);
|
||||||
|
Loading…
Reference in New Issue
Block a user