write_inode_now in nfs_unlink
Subsystems (2)
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.
Quoted 6 lines · Christoph Hellwig
Does anyone have an explanation why nfs calls
write_inode_nowbefore 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 usingfilemap_fdatawriteorfilemap_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