Messages in this thread | | | From | Neil Brown <> | Date | Thu, 30 Mar 2006 19:55:54 +1100 | Subject | Re: [patch 1/1] sys_sync_file_range() |
| |
On Thursday March 30, akpm@osdl.org wrote: > Neil Brown <neilb@suse.de> wrote: > > > > Hmmm... any chance this could be split into a sys_sync_file_range and > > a vfs_sync_file_range which takes a 'struct file*' and does less (or > > no) sanity checking, so I can call it from nfsd? > > Problem is, we don't appear to have a way of syncing the file's metadata > without also syncing all of its pagecache. > > For example, ext3_sync_file() will run a commit, which will sync all data > and metadata. > > ext2_sync_file() will also sync all pagecache as well as metadata. Even > though do_fsync() already synced the file data (!). > > > Is the below still useful?
Yes. A COMMIT can say NFS_DATA_SYNC or NFS_FILE_SYNC. I can skip the ->fsync call for NFS_DATA_SYNC which is hopefully the more common. I didn't before because when I was righting that (2.4 days) there were a lot fewer options on how to sync things.
So yes, that will be perfect, thanks.
NeilBrown
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |