From: Christoph Hellwig <hch@infradead.org>
To: xfs@oss.sgi.com
Subject: [PATCH] xfs: wait for direct I/O to complete in fsync and write_inode
Date: Sat, 6 Mar 2010 08:20:18 -0500 [thread overview]
Message-ID: <20100306132018.GA31360@infradead.org> (raw)
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
next reply other threads:[~2010-03-06 13:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 13:20 Christoph Hellwig [this message]
2010-04-13 14:37 ` [PATCH] xfs: wait for direct I/O to complete in fsync and write_inode 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100306132018.GA31360@infradead.org \
--to=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.