mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
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>
This commit is contained in:
parent
a53a3c58fd
commit
f551e44ff1
2 changed files with 13 additions and 1 deletions
|
@ -840,6 +840,12 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
|
||||||
*
|
*
|
||||||
* After an operation that has changed the inode metadata, mark the
|
* After an operation that has changed the inode metadata, mark the
|
||||||
* attribute cache as being invalid, then try to update it.
|
* attribute cache as being invalid, then try to update it.
|
||||||
|
*
|
||||||
|
* NB: if the server didn't return any post op attributes, this
|
||||||
|
* function will force the retrieval of attributes before the next
|
||||||
|
* NFS request. Thus it should be used only for operations that
|
||||||
|
* are expected to change one or more attributes, to avoid
|
||||||
|
* unnecessary NFS requests and trips through nfs_update_inode().
|
||||||
*/
|
*/
|
||||||
int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
|
int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1253,7 +1253,13 @@ int nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
|
||||||
dprintk("NFS: %4d nfs_writeback_done (status %d)\n",
|
dprintk("NFS: %4d nfs_writeback_done (status %d)\n",
|
||||||
task->tk_pid, task->tk_status);
|
task->tk_pid, task->tk_status);
|
||||||
|
|
||||||
/* Call the NFS version-specific code */
|
/*
|
||||||
|
* ->write_done will attempt to use post-op attributes to detect
|
||||||
|
* conflicting writes by other clients. A strict interpretation
|
||||||
|
* of close-to-open would allow us to continue caching even if
|
||||||
|
* another writer had changed the file, but some applications
|
||||||
|
* depend on tighter cache coherency when writing.
|
||||||
|
*/
|
||||||
status = NFS_PROTO(data->inode)->write_done(task, data);
|
status = NFS_PROTO(data->inode)->write_done(task, data);
|
||||||
if (status != 0)
|
if (status != 0)
|
||||||
return status;
|
return status;
|
||||||
|
|
Loading…
Reference in a new issue