public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Lachlan McIlroy <lachlan@sgi.com>
Cc: David Chinner <dgc@sgi.com>, xfs-dev <xfs-dev@sgi.com>,
	xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] make inode reclaim wait for log I/O to complete
Date: Thu, 22 May 2008 14:31:50 +1000	[thread overview]
Message-ID: <20080522043150.GM173056135@sgi.com> (raw)
In-Reply-To: <4834EBB7.5010200@sgi.com>

On Thu, May 22, 2008 at 01:42:47PM +1000, Lachlan McIlroy wrote:
> David Chinner wrote:
> >On Wed, May 14, 2008 at 03:24:57PM +1000, Lachlan McIlroy wrote:
> >>An xfs inode can be destroyed before log I/O involving that inode
> >>is complete.  We need to wait for the inode to be unpinned before
> >>tearing it down.
.....
> >>--- fs/xfs/xfs_vnodeops.c_1.757	2008-05-12 12:02:45.000000000 +1000
> >>+++ fs/xfs/xfs_vnodeops.c	2008-05-12 12:28:15.000000000 +1000
> >>@@ -3324,6 +3324,7 @@ xfs_finish_reclaim(
> >>			 * because we're gonna reclaim the inode anyway.
> >>			 */
> >>			if (error) {
> >>+				xfs_iunpin_wait(ip);
> >>				xfs_iunlock(ip, XFS_ILOCK_EXCL);
> >>				goto reclaim;
> >>			}
> >
> >We can't get an error from xfs_iflush() from here that hasn't
> >already passed through xfs_iunpin_wait() in xfs_iflush().
> >Hence we should never see a pinned inode through this path.
> 
> Okay, good point.  I'll remove that one.  I thought about removing
> the XFS_FORCED_SHUTDOWN() and dirty inode checks from xfs_finish_reclaim()
> and calling xfs_iflush() anyway.  It will abort if it's a clean inode
> or it will do the unpin and then abort if it's a forced shutdown.
> It would make the code in xfs_finish_reclaim() a bit cleaner.  I also
> wouldn't need to export xfs_iunpin_wait().  Thoughts?

Sounds like a fine plan. Please comment it appropriately, though.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

  reply	other threads:[~2008-05-22  4:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14  5:24 [PATCH] make inode reclaim wait for log I/O to complete Lachlan McIlroy
2008-05-14  6:44 ` David Chinner
2008-05-22  3:42   ` Lachlan McIlroy
2008-05-22  4:31     ` David Chinner [this message]
2008-05-22  8:23       ` Lachlan McIlroy
2008-05-22 23:55         ` David 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=20080522043150.GM173056135@sgi.com \
    --to=dgc@sgi.com \
    --cc=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