aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2006-09-20 14:33:04 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:25:05 -0400
commitf551e44ff11d3e2ec8f37907bb88ec2433cc8b74 (patch)
treef86527c24391f70d72a28111df5c541959e8f293 /fs
parenta53a3c58fd83e572a7c768d88b4c4e9840a57e82 (diff)
NFS: add comments clarifying the use of nfs_post_op_update()
Comments-only change to clarify a detail of the NFS protocol and how it is implemented in Linux. Test plan: None. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/inode.c6
-rw-r--r--fs/nfs/write.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index a56add0bc5b7..e8c143d182c4 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -840,6 +840,12 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
840 * 840 *
841 * After an operation that has changed the inode metadata, mark the 841 * After an operation that has changed the inode metadata, mark the
842 * attribute cache as being invalid, then try to update it. 842 * attribute cache as being invalid, then try to update it.
843 *
844 * NB: if the server didn't return any post op attributes, this
845 * function will force the retrieval of attributes before the next
846 * NFS request. Thus it should be used only for operations that
847 * are expected to change one or more attributes, to avoid
848 * unnecessary NFS requests and trips through nfs_update_inode().
843 */ 849 */
844int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr) 850int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
845{ 851{
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 38ba5c09af08..c12effb46fe5 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1253,7 +1253,13 @@ int nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
1253 dprintk("NFS: %4d nfs_writeback_done (status %d)\n", 1253 dprintk("NFS: %4d nfs_writeback_done (status %d)\n",
1254 task->tk_pid, task->tk_status); 1254 task->tk_pid, task->tk_status);
1255 1255
1256 /* Call the NFS version-specific code */ 1256 /*
1257 * ->write_done will attempt to use post-op attributes to detect
1258 * conflicting writes by other clients. A strict interpretation
1259 * of close-to-open would allow us to continue caching even if
1260 * another writer had changed the file, but some applications
1261 * depend on tighter cache coherency when writing.
1262 */
1257 status = NFS_PROTO(data->inode)->write_done(task, data); 1263 status = NFS_PROTO(data->inode)->write_done(task, data);
1258 if (status != 0) 1264 if (status != 0)
1259 return status; 1265 return status;