On Thursday March 30, [email protected] wrote:
> Neil Brown <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]