Skip to contentSkip to conversation

write_inode_now in nfs_unlink

DISCUSSION Christoph Hellwig 2 participants 2 messages Nov 7, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Does anyone have an explanation why nfs calls write_inode_now before doing a sillrename? The comment above claims that we want to start an asynchronous writeout, but given that NFS doesn't have dirty inode metadata that needs to be written back from ->write_inode this only starts data writeback. And that should be done using filemap_fdatawrite or filemap_flush.

#1 lore raw
Quoted 6 lines · Christoph Hellwig

Does anyone have an explanation why nfs calls write_inode_now before doing a sillrename? The comment above claims that we want to start an asynchronous writeout, but given that NFS doesn't have dirty inode metadata that needs to be written back from ->write_inode this only starts data writeback. And that should be done using filemap_fdatawrite or filemap_flush.

filemap_fdatawrite() is never sufficient for writing out data, since it does nothing to ensure that the COMMIT gets sent: we have do that through the ->write_inode() callback.
With pNFS there can also be the issue of sending the layoutcommit...

Cheers
Trond

Signature · 6 lines
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com