From: Lachlan McIlroy <lachlan@sgi.com>
To: xfs@oss.sgi.com, xfs-dev <xfs-dev@sgi.com>
Subject: [PATCH] Move vn_iowait() earlier in the reclaim path
Date: Tue, 05 Aug 2008 16:43:29 +1000 [thread overview]
Message-ID: <4897F691.6010806@sgi.com> (raw)
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);
/*
next reply other threads:[~2008-08-05 6:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 6:43 Lachlan McIlroy [this message]
2008-08-05 7:37 ` [PATCH] Move vn_iowait() earlier in the reclaim path 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
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=4897F691.6010806@sgi.com \
--to=lachlan@sgi.com \
--cc=xfs-dev@sgi.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox