[Top] [All Lists]

[PATCH 13/17] xfs: Convert sync_page_range() to simple fdatawrite_range(

To: LKML <linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH 13/17] xfs: Convert sync_page_range() to simple fdatawrite_range()
From: Jan Kara <jack@xxxxxxx>
Date: Fri, 21 Aug 2009 19:24:03 +0200
Cc: hch@xxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, Jan Kara <jack@xxxxxxx>, Felix Blyakher <felixb@xxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <1250875447-15622-1-git-send-email-jack@xxxxxxx>
References: <1250875447-15622-1-git-send-email-jack@xxxxxxx>
Christoph Hellwig says that it is enough for XFS to call
filemap_fdatawrite_range() instead of sync_page_range() because we do all the
waiting when forcing the log.

CC: Felix Blyakher <felixb@xxxxxxx>
CC: xfs@xxxxxxxxxxx
CC: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Jan Kara <jack@xxxxxxx>
 fs/xfs/linux-2.6/xfs_lrw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index 7078974..a68053c 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -817,7 +817,7 @@ write_retry:
                xfs_iunlock(xip, iolock);
                if (need_i_mutex)
-               error2 = sync_page_range(inode, mapping, pos, ret);
+               error2 = filemap_fdatawrite_range(mapping, pos, pos + ret - 1);
                if (!error)
                        error = error2;
                if (need_i_mutex)

<Prev in Thread] Current Thread [Next in Thread>