xfs
[Top] [All Lists]

Re: REVIEW: Write primary superblock info to ALL secondaries during mkfs

To: "David Chinner" <dgc@xxxxxxx>
Subject: Re: REVIEW: Write primary superblock info to ALL secondaries during mkfs
From: "Barry Naujok" <bnaujok@xxxxxxx>
Date: Tue, 25 Mar 2008 17:16:44 +1100
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
In-reply-to: <20080325060017.GK103491721@xxxxxxx>
Organization: SGI
References: <op.t8j4nch93jf8g2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20080325060017.GK103491721@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Opera Mail/9.24 (Win32)
On Tue, 25 Mar 2008 17:00:17 +1100, David Chinner <dgc@xxxxxxx> wrote:

On Tue, Mar 25, 2008 at 04:39:02PM +1100, Barry Naujok wrote:
Secondaries should contain redundant information from the primary
superblock. It does this for the filesystem geometry information,
but not inode values (rootino, rt inos, quota inos).

This patch updates all the secondaries from the primary just before
it marks the filesystem as good to go.

So it's got all the inodes, geometry, etc correct in them?

So what about the fact that the kernel code doesn't keep all
copies up to date? e.g. growfs will only write new values into
a handful of superblocks, changing sunit/swidth via mount options
only change the primary, etc....

If you are going to change mkfs to keep them all up to date, the
kernel code really needs to do the same thing....

Yes it should :) Geometry information was already done across all
the AGs.


        /*
-        * Dump all inodes and buffers before marking us all done.
-        * Need to drop references to inodes we still hold, first.
+        * Flush out all inodes and buffers before marking us all done.
         */
        libxfs_rtmount_destroy(mp);
        libxfs_icache_purge();
-       libxfs_bcache_purge();
+       libxfs_bcache_flush();

Don't you still need a purge there to free all the objects in the
cache?

No, the flush does what is required. There is no libxfs_icache_flush
at the moment, so I left the purge there for that.

libxfs_umount later on does a libxfs_*_purge() anyway.

The main thing is to make sure all objects are written to disk before
the sb_inprogress field in the primary superblock is zeroed.

Barry.


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