FreeBSD Bugzilla – Attachment 228935 Details for
Bug 259071
Read past EoF in NFS client and fusefs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mark local file modification and avoid loading Lookup attributes when marked
stat.patch (text/plain), 2.38 KB, created by
Rick Macklem
on 2021-10-22 03:18:56 UTC
(
hide
)
Description:
mark local file modification and avoid loading Lookup attributes when marked
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2021-10-22 03:18:56 UTC
Size:
2.38 KB
patch
obsolete
>--- sys/fs/nfsclient/nfs_clbio.c.stat 2021-10-21 16:34:29.539604000 -0700 >+++ sys/fs/nfsclient/nfs_clbio.c 2021-10-21 16:40:00.779522000 -0700 >@@ -917,8 +917,10 @@ ncl_write(struct vop_write_args *ap) > np->n_flag &= ~NWRITEERR; > NFSUNLOCKNODE(np); > return (np->n_error); >- } else >+ } else { >+ np->n_flag |= NMODLOCALLY; > NFSUNLOCKNODE(np); >+ } > mtx_lock(&nmp->nm_mtx); > if ((nmp->nm_flag & NFSMNT_NFSV3) != 0 && > (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) { >--- sys/fs/nfsclient/nfs_clnode.c.stat 2021-10-21 14:42:43.723059000 -0700 >+++ sys/fs/nfsclient/nfs_clnode.c 2021-10-21 14:43:33.911981000 -0700 >@@ -277,7 +277,7 @@ ncl_inactive(struct vop_inactive_args *ap) > * should be done to the DS. > * None of the other flags are meaningful after the vnode is unused. > */ >- np->n_flag &= (NMODIFIED | NDSCOMMIT); >+ np->n_flag &= (NMODIFIED | NDSCOMMIT | NMODLOCALLY); > NFSUNLOCKNODE(np); > return (0); > } >--- sys/fs/nfsclient/nfs_clvnops.c.stat 2021-10-21 15:12:24.249198000 -0700 >+++ sys/fs/nfsclient/nfs_clvnops.c 2021-10-21 15:11:32.324117000 -0700 >@@ -1066,6 +1066,7 @@ nfs_setattr(struct vop_setattr_args *ap) > * value. > */ > NFSLOCKNODE(np); >+ np->n_flag |= NMODLOCALLY; > tsize = np->n_size; > NFSUNLOCKNODE(np); > error = ncl_meta_setsize(vp, td, vap->va_size); >@@ -1358,6 +1359,10 @@ nfs_lookup(struct vop_lookup_args *ap) > LK_EXCLUSIVE); > if (error) > return (error); >+ NFSLOCKNODE(np); >+ if ((np->n_flag & NMODLOCALLY) != 0) >+ attrflag = 0; >+ NFSUNLOCKNODE(np); > newvp = NFSTOV(np); > if (attrflag) > (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, >@@ -1417,6 +1422,10 @@ nfs_lookup(struct vop_lookup_args *ap) > cnp->cn_lkflags); > if (error) > return (error); >+ NFSLOCKNODE(np); >+ if ((np->n_flag & NMODLOCALLY) != 0) >+ attrflag = 0; >+ NFSUNLOCKNODE(np); > newvp = NFSTOV(np); > if (attrflag) > (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, >--- sys/fs/nfsclient/nfsnode.h.stat 2021-10-21 14:33:13.350971000 -0700 >+++ sys/fs/nfsclient/nfsnode.h 2021-10-21 14:34:00.335464000 -0700 >@@ -166,6 +166,7 @@ struct nfsnode { > #define NDSCOMMIT 0x00100000 /* Commit is done via the DS. */ > #define NVNSETSZSKIP 0x00200000 /* Skipped vnode_pager_setsize() */ > #define NMIGHTBELOCKED 0x00400000 /* Might be file locked. */ >+#define NMODLOCALLY 0x00800000 /* File modified locally. */ > > /* > * Convert between nfsnode pointers and vnode pointers
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 259071
:
228584
|
228935
|
228973
|
229053