Newly-created inodes should be marked as modified.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Wed, 11 Aug 2010 20:15:14 +0000 (13:15 -0700)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Wed, 11 Aug 2010 20:15:14 +0000 (13:15 -0700)
The NFS proxy code previously didn't do this, with the result that some
inodes (symlinks were first noticed, but the problem affected other areas
too) would not get entered into the appropriate LRU lists.

nfs3/nfs3.c

index 2a5b789..7662a2c 100644 (file)
@@ -489,6 +489,7 @@ void nfsproc3_create_3_svc(create3args *argp, RPCRequest *req)
     bluesky_directory_insert(dir, argp->where.name, file->inum);
 
     bluesky_inode_update_ctime(dir, TRUE);
+    bluesky_inode_update_ctime(file, FALSE);
 
     wcc.after.present = TRUE;
     encode_fattr3(&wcc.after.post_op_attr_u.attributes, dir);
@@ -564,6 +565,7 @@ void nfsproc3_mkdir_3_svc(mkdir3args *argp, RPCRequest *req)
     set_attributes(file, &argp->attributes);
 
     bluesky_inode_update_ctime(dir, TRUE);
+    bluesky_inode_update_ctime(file, FALSE);
 
     wcc.after.present = TRUE;
     encode_fattr3(&wcc.after.post_op_attr_u.attributes, dir);
@@ -637,6 +639,7 @@ void nfsproc3_symlink_3_svc(symlink3args *argp, RPCRequest *req)
     bluesky_directory_insert(dir, argp->where.name, file->inum);
 
     bluesky_inode_update_ctime(dir, TRUE);
+    bluesky_inode_update_ctime(file, FALSE);
 
     wcc.after.present = TRUE;
     encode_fattr3(&wcc.after.post_op_attr_u.attributes, dir);