linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: aelder@sgi.com, xfs@oss.sgi.com, akpm@linux-foundation.org,
	sfr@canb.auug.org.au
Cc: linux-fsdevel@vger.kernel.org, Dave Chinner <david@fromorbit.com>
Subject: [PATCH 2/5] [PATCH 5/5] xfs: fix xfs_quiesce_data
Date: Tue, 06 Oct 2009 16:29:27 -0400	[thread overview]
Message-ID: <20091006203642.877846388@bombadil.infradead.org> (raw)
In-Reply-To: 20091006202925.459164320@bombadil.infradead.org

[-- Attachment #1: xfs-fix-xfs_quiesce_data --]
[-- Type: text/plain, Size: 1265 bytes --]

From: Dave Chinner <david@fromorbit.com>

We need to do a synchronous xfs_sync_fsdata to make sure the superblock
actually is on disk when we return.

Also remove SYNC_BDFLUSH flag to xfs_sync_inodes because that particular
flag is never checked.

Move xfs_filestream_flush call later to only release inodes after they
have been written out.


Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/xfs/linux-2.6/xfs_sync.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_sync.c	2009-08-27 20:06:39.889355294 -0300
+++ linux-2.6/fs/xfs/linux-2.6/xfs_sync.c	2009-08-27 20:08:01.169357854 -0300
@@ -426,14 +426,16 @@ xfs_quiesce_data(
 	/* push non-blocking */
 	xfs_sync_data(mp, 0);
 	xfs_qm_sync(mp, SYNC_TRYLOCK);
-	xfs_filestream_flush(mp);
 
-	/* push and block */
+	/* push and block till complete */
 	xfs_sync_data(mp, SYNC_WAIT);
 	xfs_qm_sync(mp, SYNC_WAIT);
 
+	/* drop inode references pinned by filestreams */
+	xfs_filestream_flush(mp);
+
 	/* write superblock and hoover up shutdown errors */
-	error = xfs_sync_fsdata(mp, 0);
+	error = xfs_sync_fsdata(mp, SYNC_WAIT);
 
 	/* flush data-only devices */
 	if (mp->m_rtdev_targp)


  parent reply	other threads:[~2009-10-06 20:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06 20:29 [PATCH 0/5] XFS fixes for 2.6.32 Christoph Hellwig
2009-10-06 20:29 ` [PATCH 1/5] xfs: implement ->dirty_inode to fix timestamp handling Christoph Hellwig
2009-10-06 20:29 ` Christoph Hellwig [this message]
2009-10-06 20:29 ` [PATCH 3/5] [PATCH 2/5] xfs: cleanup ->sync_fs Christoph Hellwig
2009-10-06 20:29 ` [PATCH 4/5] xfs: mark inodes dirty before issuing I/O Christoph Hellwig
2009-10-06 20:29 ` [PATCH 5/5] xfs: make sure xfs_sync_fsdata covers the log Christoph Hellwig

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=20091006203642.877846388@bombadil.infradead.org \
    --to=hch@infradead.org \
    --cc=aelder@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --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;
as well as URLs for NNTP newsgroup(s).