public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* nfs_file_fsync question
@ 2009-09-26 17:18 Christoph Hellwig
  2009-09-27 22:02 ` Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2009-09-26 17:18 UTC (permalink / raw)
  To: linux-nfs

Can anyone explain what nfs_do_fsync/nfs_wb_all is trying to do?

We use it for two cases:  either implementing ->fsync or the O_SYNC
implementation in ->aio_write/->splice_write.

But vfs_fsync_range which is used both by the fsync implementation and
called from generic_file_aio_write / generic_file_splice_write alread
y writes out all data and handles errors from it, so ->fsync does not
need to bother with data at all.  nfs_wb_all seems like a
re-implmenetation of the generic page flushing helpers in filemap.c
and not actually touch metadata.  So this code seems useless for the
fsync and O_SYNC cases and only useful for the error catching.  Which
we already do slightly different at VFS-level.  Any reasons to keep
all this cruft around instead of properly integrating it with the
VFS-level error reporting?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-27 22:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-26 17:18 nfs_file_fsync question Christoph Hellwig
2009-09-27 22:02 ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox