Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163398583
D43288.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
D43288.diff
View Options
diff --git a/sys/fs/nfsclient/nfs_clvnops.c.objflush b/sys/fs/nfsclient/nfs_clvnops.c
--- a/sys/fs/nfsclient/nfs_clvnops.c.objflush
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -1982,6 +1982,7 @@
struct nfsnode *fnp = VTONFS(ap->a_fvp);
struct nfsnode *tdnp = VTONFS(ap->a_tdvp);
struct nfsv4node *newv4 = NULL;
+ vm_object_t obj;
int error;
/* Check for cross-device rename */
@@ -2012,10 +2013,24 @@
* that was written back to our cache earlier. Not checking for
* this condition can result in potential (silent) data loss.
*/
+ obj = fvp->v_object;
+ if (obj != NULL && vm_object_mightbedirty(obj)) {
+ VM_OBJECT_WLOCK(obj);
+ vm_object_page_clean(obj, 0, 0, OBJPC_SYNC);
+ VM_OBJECT_WUNLOCK(obj);
+ }
error = VOP_FSYNC(fvp, MNT_WAIT, curthread);
NFSVOPUNLOCK(fvp);
- if (!error && tvp)
+ if (!error && tvp) {
+ ASSERT_VOP_ELOCKED(tvp, "nfs_rename");
+ obj = tvp->v_object;
+ if (obj != NULL && vm_object_mightbedirty(obj)) {
+ VM_OBJECT_WLOCK(obj);
+ vm_object_page_clean(obj, 0, 0, OBJPC_SYNC);
+ VM_OBJECT_WUNLOCK(obj);
+ }
error = VOP_FSYNC(tvp, MNT_WAIT, curthread);
+ }
if (error)
goto out;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 23, 8:49 PM (9 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35415061
Default Alt Text
D43288.diff (1 KB)
Attached To
Mode
D43288: Make nfs_rename flush possibly dirty mmap'd pages
Attached
Detach File
Event Timeline
Log In to Comment