FreeBSD Bugzilla – Attachment 16980 Details for
Bug 30971
[nfs] NFS client modification time resolution is not high enough, which may cause client side cache inconsistent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.77 KB, created by
Wencheng Chai
on 2001-10-01 23:30:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Wencheng Chai
Created:
2001-10-01 23:30:00 UTC
Size:
3.77 KB
patch
obsolete
>*** /usr/src/sys/nfs/nfs_vnops.c Tue Aug 21 12:39:09 2001 >--- nfs_vnops.c Wed Sep 12 03:48:46 2001 >*************** >*** 507,523 **** > if (error) > return (error); > np->n_mtime = vattr.va_mtime.tv_sec; > } else { > error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_p); > if (error) > return (error); >! if (np->n_mtime != vattr.va_mtime.tv_sec) { > if (vp->v_type == VDIR) > np->n_direofoffset = 0; > if ((error = nfs_vinvalbuf(vp, V_SAVE, > ap->a_cred, ap->a_p, 1)) == EINTR) > return (error); > np->n_mtime = vattr.va_mtime.tv_sec; > } > } > } >--- 507,528 ---- > if (error) > return (error); > np->n_mtime = vattr.va_mtime.tv_sec; >+ np->n_vattr.va_mtime.tv_sec = vattr.va_mtime.tv_sec; >+ np->n_vattr.va_mtime.tv_nsec = vattr.va_mtime.tv_nsec; > } else { > error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_p); > if (error) > return (error); >! if ((np->n_vattr.va_mtime.tv_sec != vattr.va_mtime.tv_se >c)||((np->n_vattr.va_mtime.tv_sec == vattr.va_mtime.tv_sec)&&(np->n_vattr.va_mti >me.tv_nsec != vattr.va_mtime.tv_nsec))) { >! > if (vp->v_type == VDIR) > np->n_direofoffset = 0; > if ((error = nfs_vinvalbuf(vp, V_SAVE, > ap->a_cred, ap->a_p, 1)) == EINTR) > return (error); > np->n_mtime = vattr.va_mtime.tv_sec; >+ np->n_vattr.va_mtime.tv_sec = vattr.va_mtime.tv_ >sec; >+ np->n_vattr.va_mtime.tv_nsec = vattr.va_mtime.tv >_nsec; > } > } > } >*************** >*** 1260,1266 **** > } > } else > nfsm_loadattr(vp, (struct vattr *)0); >! if (wccflag) > VTONFS(vp)->n_mtime = VTONFS(vp)->n_vattr.va_mtime.tv_sec; > m_freem(mrep); > if (error) >--- 1265,1271 ---- > } > } else > nfsm_loadattr(vp, (struct vattr *)0); >! if (wccflag) > VTONFS(vp)->n_mtime = VTONFS(vp)->n_vattr.va_mtime.tv_sec; > m_freem(mrep); > if (error) >*************** >*** 2064,2071 **** > nfsstats.direofcache_hits++; > return (0); > } >! } else if (VOP_GETATTR(vp, &vattr, ap->a_cred, uio->uio_procp) = >= 0 && >! np->n_mtime == vattr.va_mtime.tv_sec) { > nfsstats.direofcache_hits++; > return (0); > } >--- 2069,2075 ---- > nfsstats.direofcache_hits++; > return (0); > } >! } else if ((VOP_GETATTR(vp, &vattr, ap->a_cred, uio->uio_procp) >== 0) &&((np->n_vattr.va_mtime.tv_sec != vattr.va_mtime.tv_sec)||((np->n_vattr.v >a_mtime.tv_sec == vattr.va_mtime.tv_sec)&&(np->n_vattr.va_mtime.tv_nsec != vattr >.va_mtime.tv_nsec)))) { > nfsstats.direofcache_hits++; > return (0); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 30971
:
16979
| 16980