Re: [RFC PATCH 4/4] If 'wsync' pass datasync=1 to vfs_fsync().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 03, 2010 at 05:44:44PM -0600, Ben Myers wrote:
> 
> ---
>  fs/nfsd/vfs.c |   39 +++++++++++++++++++++++++--------------
>  1 files changed, 25 insertions(+), 14 deletions(-)
> 
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 89eb1b2..4b1973b 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -418,7 +418,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
>  	if (!err) {
>  		if (EX_ISSYNC(fhp->fh_export)) {
>  			if (EX_ISWSYNC(fhp->fh_export)) {
> -				vfs_fsync(NULL, dentry, 0);
> +				vfs_fsync(NULL, dentry, 1);

I think this is incorrect.  datasync = 1 means to only write out
metadata that is required to access the file data.  The write_inode code
makes sure all metadata goes out, which AFAIK is what the NFS protocol
requires from us anyway for all these metadata operations.

Note that this does not invalidate your XFS numbers as right now XFS
doesn't actually implement the datasync == 1 optimization, although I'm
about to send a patch to do that.  The updsize is that this will
make your patchset quite a bit simpler :)

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux