public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Lachlan McIlroy <lachlan@sgi.com>
Cc: xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] make inode reclaim synchronise with xfs_iflush_done()
Date: Fri, 14 Dec 2007 20:29:40 +0000	[thread overview]
Message-ID: <20071214202940.GA23564@infradead.org> (raw)
In-Reply-To: <475F878D.6090407@sgi.com>

On Wed, Dec 12, 2007 at 06:02:37PM +1100, Lachlan McIlroy wrote:
> On a forced shutdown, xfs_finish_reclaim() will skip flushing the inode.
> If the inode flush lock is not already held and there is an outstanding
> xfs_iflush_done() then we might free the inode prematurely.  By acquiring
> and releasing the flush lock we will synchronise with xfs_iflush_done().

Sound fine, but I think it would be nicer if we could keep the else if
formatting, ala:

 	/*
 	 * We are not interested in doing an iflush if we're
	 * in the process of shutting down the filesystem forcibly.
	 * So, just reclaim the inode.
	 */
	} else if (locked) {
		xfs_ifunlock(ip);
		xfs_iunlock(ip, XFS_ILOCK_EXCL);
	} else {
		/* 
		 * If the flush lock is not already held then temporarily
		 * acquire it to synchronize with xfs_iflush_done.
		 */
		xfs_iflock(ip);
		xfs_ifunlock(ip);
	}

  reply	other threads:[~2007-12-14 20:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12  7:02 [PATCH] make inode reclaim synchronise with xfs_iflush_done() Lachlan McIlroy
2007-12-14 20:29 ` Christoph Hellwig [this message]
     [not found] ` <20071212230858.GO4612@sgi.com>
2008-01-14  3:57   ` 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=20071214202940.GA23564@infradead.org \
    --to=hch@infradead.org \
    --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