* [PATCH] xfs: wait for direct I/O to complete in fsync and write_inode
@ 2010-03-06 13:20 Christoph Hellwig
2010-04-13 14:37 ` Christoph Hellwig
2010-04-13 23:40 ` Dave Chinner
0 siblings, 2 replies; 5+ messages in thread
From: Christoph Hellwig @ 2010-03-06 13:20 UTC (permalink / raw)
To: xfs
We need to wait for all pending direct I/O requests before taking care of
metadata in fsync and write_inode.
Note that the write_inode hunk will causes conflicts when merging with
mainline, I'm not sure how to best deal with that.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs/fs/xfs/linux-2.6/xfs_file.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_file.c 2010-03-06 14:10:12.247004588 +0100
+++ xfs/fs/xfs/linux-2.6/xfs_file.c 2010-03-06 14:16:48.460003752 +0100
@@ -115,6 +115,8 @@ xfs_file_fsync(
xfs_iflags_clear(ip, XFS_ITRUNCATED);
+ xfs_ioend_wait(ip);
+
/*
* We always need to make sure that the required inode state is safe on
* disk. The inode might be clean but we still might need to force the
Index: xfs/fs/xfs/linux-2.6/xfs_super.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2010-03-06 14:10:12.259026379 +0100
+++ xfs/fs/xfs/linux-2.6/xfs_super.c 2010-03-06 14:16:48.461003193 +0100
@@ -1079,6 +1079,8 @@ xfs_fs_write_inode(
if (error)
goto out;
+ xfs_ioend_wait(ip);
+
/*
* Make sure the inode has hit stable storage. By using the
* log and the fsync transactions we reduce the IOs we have
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: wait for direct I/O to complete in fsync and write_inode
2010-03-06 13:20 [PATCH] xfs: wait for direct I/O to complete in fsync and write_inode Christoph Hellwig
@ 2010-04-13 14:37 ` Christoph Hellwig
2010-04-13 23:40 ` Dave Chinner
1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2010-04-13 14:37 UTC (permalink / raw)
To: xfs
On Sat, Mar 06, 2010 at 08:20:18AM -0500, Christoph Hellwig wrote:
>
> We need to wait for all pending direct I/O requests before taking care of
> metadata in fsync and write_inode.
ping?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: wait for direct I/O to complete in fsync and write_inode
2010-03-06 13:20 [PATCH] xfs: wait for direct I/O to complete in fsync and write_inode Christoph Hellwig
2010-04-13 14:37 ` Christoph Hellwig
@ 2010-04-13 23:40 ` Dave Chinner
1 sibling, 0 replies; 5+ messages in thread
From: Dave Chinner @ 2010-04-13 23:40 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Sat, Mar 06, 2010 at 08:20:18AM -0500, Christoph Hellwig wrote:
>
> We need to wait for all pending direct I/O requests before taking care of
> metadata in fsync and write_inode.
Sorry, I missed this one when scaning the list for outstanding
patches yesterday. The concept looks fine, though:
> Note that the write_inode hunk will causes conflicts when merging with
> mainline, I'm not sure how to best deal with that.
I don't think it applies to the current xfs-dev tree any more,
either. Can you rebase it?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] xfs: wait for direct I/O to complete in fsync and write_inode
@ 2010-04-18 0:02 Christoph Hellwig
2010-04-20 5:25 ` Dave Chinner
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2010-04-18 0:02 UTC (permalink / raw)
To: xfs
We need to wait for all pending direct I/O requests before taking care of
metadata in fsync and write_inode.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs/fs/xfs/linux-2.6/xfs_file.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_file.c 2010-03-15 09:24:53.332004798 -0700
+++ xfs/fs/xfs/linux-2.6/xfs_file.c 2010-04-16 09:50:08.197004486 -0700
@@ -115,6 +115,8 @@ xfs_file_fsync(
xfs_iflags_clear(ip, XFS_ITRUNCATED);
+ xfs_ioend_wait(ip);
+
/*
* We always need to make sure that the required inode state is safe on
* disk. The inode might be clean but we still might need to force the
Index: xfs/fs/xfs/linux-2.6/xfs_super.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2010-04-05 11:21:31.643011861 -0700
+++ xfs/fs/xfs/linux-2.6/xfs_super.c 2010-04-16 09:51:19.891255575 -0700
@@ -1092,6 +1092,7 @@ xfs_fs_write_inode(
* the code will only flush the inode if it isn't already
* being flushed.
*/
+ xfs_ioend_wait(ip);
xfs_ilock(ip, XFS_ILOCK_SHARED);
if (ip->i_update_core) {
error = xfs_log_inode(ip);
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-20 5:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-06 13:20 [PATCH] xfs: wait for direct I/O to complete in fsync and write_inode Christoph Hellwig
2010-04-13 14:37 ` Christoph Hellwig
2010-04-13 23:40 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2010-04-18 0:02 Christoph Hellwig
2010-04-20 5:25 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox