xfs
[Top] [All Lists]

RE: [PATCH] xfs: stop calling filemap_fdatawait inside ->fsync

To: "Christoph Hellwig" <hch@xxxxxxxxxxxxx>, <xfs@xxxxxxxxxxx>
Subject: RE: [PATCH] xfs: stop calling filemap_fdatawait inside ->fsync
From: "Alex Elder" <aelder@xxxxxxx>
Date: Wed, 7 Oct 2009 17:23:34 -0500
In-reply-to: <20090926195504.GA11121@xxxxxxxxxxxxx>
Thread-index: Aco+5VQKPROL9zwWQcC13H+en4zxQwIt2Wuw
Thread-topic: [PATCH] xfs: stop calling filemap_fdatawait inside ->fsync
Christoph Hellwig wrote:
> Now that the VFS actually waits for the data I/O to complete before
> calling into ->fsync we can stop doing it ourselves.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks good.

Reviewed-by: Alex Elder <aelder@xxxxxxx>

> Index: linux-2.6/fs/xfs/linux-2.6/xfs_file.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_file.c        2009-09-26 
> 14:09:24.933003650 -0300
> +++ linux-2.6/fs/xfs/linux-2.6/xfs_file.c     2009-09-26 14:09:46.804256831 
> -0300
> @@ -176,14 +176,7 @@ xfs_file_fsync(
>       struct dentry           *dentry,
>       int                     datasync)
>  {
> -     struct inode            *inode = dentry->d_inode;
>       struct xfs_inode        *ip = XFS_I(inode);
> -     int                     error;
> -
> -     /* capture size updates in I/O completion before writing the inode. */
> -     error = filemap_fdatawait(inode->i_mapping);
> -     if (error)
> -             return error;
> 
>       xfs_iflags_clear(ip, XFS_ITRUNCATED);
>       return -xfs_fsync(ip);
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>
  • RE: [PATCH] xfs: stop calling filemap_fdatawait inside ->fsync, Alex Elder <=