xfs
[Top] [All Lists]

Re: [PATCH 4/8] xfsprogs: mkfs.xfs: let libxfs_umount() do its thing

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH 4/8] xfsprogs: mkfs.xfs: let libxfs_umount() do its thing
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sun, 13 Nov 2011 07:04:22 -0500
Cc: xfs@xxxxxxxxxxx, Kevan Rehm <kfr@xxxxxxx>
In-reply-to: <9f5a2c84d462158505a0a4fce6c9417315ab59ee.1320955676.git.aelder@xxxxxxx>
References: <3ed89446f6dc1231ec1de712f242522052952b7e.1320955675.git.aelder@xxxxxxx> <9f5a2c84d462158505a0a4fce6c9417315ab59ee.1320955676.git.aelder@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Nov 10, 2011 at 02:35:14PM -0600, Alex Elder wrote:
> From: Kevan Rehm <kfr@xxxxxxx>
> 
> 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@xxxxxxx>
> ---
>  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?

<Prev in Thread] Current Thread [Next in Thread>