Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147762654
D28306.id82773.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28306.id82773.diff
View Options
diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c
--- a/sys/fs/nfsclient/nfs_clbio.c
+++ b/sys/fs/nfsclient/nfs_clbio.c
@@ -893,7 +893,7 @@
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
daddr_t lbn;
int bcount, noncontig_write, obcount;
- int bp_cached, n, on, error = 0, error1, wouldcommit;
+ int bp_cached, n, on, error = 0, error1, save2, wouldcommit;
size_t orig_resid, local_resid;
off_t orig_size, tmp_off;
@@ -985,6 +985,7 @@
if (vn_rlimit_fsize(vp, uio, td))
return (EFBIG);
+ save2 = curthread_pflags2_set(TDP2_SBPAGES);
biosize = vp->v_bufobj.bo_bsize;
/*
* Find all of this file's B_NEEDCOMMIT buffers. If our writes
@@ -1023,7 +1024,7 @@
error = ncl_vinvalbuf(vp, V_SAVE | ((ioflag &
IO_VMIO) != 0 ? V_VMIO : 0), td, 1);
if (error != 0)
- return (error);
+ goto out;
wouldcommit = biosize;
}
}
@@ -1063,6 +1064,7 @@
NFSLOCKNODE(np);
np->n_size = uio->uio_offset + n;
np->n_flag |= NMODIFIED;
+ np->n_flag &= ~NVNSETSZSKIP;
vnode_pager_setsize(vp, np->n_size);
NFSUNLOCKNODE(np);
@@ -1092,6 +1094,7 @@
if (uio->uio_offset + n > np->n_size) {
np->n_size = uio->uio_offset + n;
np->n_flag |= NMODIFIED;
+ np->n_flag &= ~NVNSETSZSKIP;
vnode_pager_setsize(vp, np->n_size);
}
NFSUNLOCKNODE(np);
@@ -1281,6 +1284,13 @@
}
}
+out:
+ curthread_pflags2_restore(save2);
+ if ((curthread->td_pflags2 & TDP2_SBPAGES) == 0) {
+ NFSLOCKNODE(np);
+ ncl_pager_setsize(vp, NULL);
+ }
+
return (error);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 14, 11:50 AM (15 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29668336
Default Alt Text
D28306.id82773.diff (1 KB)
Attached To
Mode
D28306: nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write
Attached
Detach File
Event Timeline
Log In to Comment