public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Move vn_iowait() earlier in the reclaim path
@ 2008-08-05  6:43 Lachlan McIlroy
  2008-08-05  7:37 ` Dave Chinner
  0 siblings, 1 reply; 11+ messages in thread
From: Lachlan McIlroy @ 2008-08-05  6:43 UTC (permalink / raw)
  To: xfs, xfs-dev

Currently by the time we get to vn_iowait() in xfs_reclaim() we have already
gone through xfs_inactive()/xfs_free() and recycled the inode.  Any I/O
completions still running (file size updates and unwritten extent conversions)
may be working on an inode that is no longer valid.

--- a/fs/xfs/linux-2.6/xfs_super.c	2008-08-05 16:27:57.000000000 +1000
+++ b/fs/xfs/linux-2.6/xfs_super.c	2008-08-05 13:54:41.000000000 +1000
@@ -935,6 +935,7 @@ xfs_fs_clear_inode(
 		XFS_STATS_INC(vn_reclaim);
 		XFS_STATS_DEC(vn_active);
 
+		vn_iowait(ip);
 		xfs_inactive(ip);
 		xfs_iflags_clear(ip, XFS_IMODIFIED);
 		if (xfs_reclaim(ip))
--- a/fs/xfs/xfs_vnodeops.c	2008-08-05 16:27:57.000000000 +1000
+++ b/fs/xfs/xfs_vnodeops.c	2008-08-05 13:54:43.000000000 +1000
@@ -2802,8 +2802,6 @@ xfs_reclaim(
 		return 0;
 	}
 
-	vn_iowait(ip);
-
 	ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0);
 
 	/*

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-08-08  8:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05  6:43 [PATCH] Move vn_iowait() earlier in the reclaim path Lachlan McIlroy
2008-08-05  7:37 ` Dave Chinner
2008-08-05  7:44   ` Dave Chinner
2008-08-05  7:52   ` Lachlan McIlroy
2008-08-05  8:42     ` Dave Chinner
2008-08-06  2:28       ` Lachlan McIlroy
2008-08-06  5:20         ` Dave Chinner
2008-08-06  6:10           ` Lachlan McIlroy
2008-08-06  9:38             ` Dave Chinner
2008-08-07  8:43               ` Lachlan McIlroy
2008-08-08  8:32                 ` Lachlan McIlroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox