public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Alex Elder <aelder@sgi.com>
Cc: Kevan Rehm <kfr@sgi.com>, xfs@oss.sgi.com
Subject: Re: [PATCH 4/8] xfsprogs: mkfs.xfs: let libxfs_umount() do its thing
Date: Sun, 13 Nov 2011 07:04:22 -0500	[thread overview]
Message-ID: <20111113120421.GD19435@infradead.org> (raw)
In-Reply-To: <9f5a2c84d462158505a0a4fce6c9417315ab59ee.1320955676.git.aelder@sgi.com>

On Thu, Nov 10, 2011 at 02:35:14PM -0600, Alex Elder wrote:
> From: Kevan Rehm <kfr@sgi.com>
> 
> In the mkfs.xfs main() routine (which is gargantuan, by the way),
> there are a few function calls intended to do some clean up before
> unmounting the filesystem.
> 
> The first function drops references that will be dropped again in
> the unmnount call.  The others assume all references will go away as
> a result of the purge, but the filesystem's root inode reference
> will remain.
> 
> Let the unmount function take care of destroying the real-time
> structures.  And instead of purging the inode and block caches, just
> flush them (at least the block cache) and let the unmount code take
> care of the final purge.
> 
> Signed-off-by: Alex Elder <aelder@sgi.com>
> ---
>  mkfs/xfs_mkfs.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index f527f3d..213cc74 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -2674,9 +2674,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
>  	 * Dump all inodes and buffers before marking us all done.
>  	 * Need to drop references to inodes we still hold, first.
>  	 */
> -	libxfs_rtmount_destroy(mp);

After his libxfs_rtmount_destroy should be marked static.
> -	libxfs_icache_purge();
> -	libxfs_bcache_purge();
> +	libxfs_bcache_flush();

Why don't we need a flush for the inode cache here?

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-11-13 12:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 20:35 [PATCH 0/8] xfsprogs: new resvsp db command, plus some fixes Alex Elder
2011-11-10 20:35 ` [PATCH 1/8] xfsprogs: Fix setbitval() bug when nbits is byte-aligned Alex Elder
2011-11-10 20:35   ` [PATCH 2/8] xfsprogs: unconditionally drop used buffer reference Alex Elder
2011-11-13 11:59     ` Christoph Hellwig
2011-11-10 20:35   ` [PATCH 3/8] xfsprogs: xfs_repair: don't set the root inode pointer Alex Elder
2011-11-13 12:01     ` Christoph Hellwig
2012-02-07 18:38       ` Christoph Hellwig
2012-02-07 20:25         ` Kevan Rehm
2012-02-07 21:46           ` Kevan Rehm
2011-11-10 20:35   ` [PATCH 4/8] xfsprogs: mkfs.xfs: let libxfs_umount() do its thing Alex Elder
2011-11-13 12:04     ` Christoph Hellwig [this message]
2011-11-10 20:35   ` [PATCH 5/8] xfsprogs: Drop root inode refrerence in libxfs_umount() Alex Elder
2011-11-13 12:07     ` Christoph Hellwig
2011-11-10 20:35   ` [PATCH 6/8] xfsprogs: xfs_db: unmount fs before exiting Alex Elder
2011-11-13 12:09     ` Christoph Hellwig
2011-11-10 20:35   ` [PATCH 7/8] xfsprogs: clean up errors in libxfs_mount() consistently Alex Elder
2011-11-14 10:28     ` Christoph Hellwig
2011-11-10 20:35   ` [PATCH 8/8] xfsprogs: xfs_db: add new "resvsp" command Alex Elder
2011-11-11  1:29     ` Dave 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=20111113120421.GD19435@infradead.org \
    --to=hch@infradead.org \
    --cc=aelder@sgi.com \
    --cc=kfr@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