[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061007125744.fd5eb3b4.akpm@osdl.org>
Date: Sat, 7 Oct 2006 12:57:44 -0700
From: Andrew Morton <akpm@...l.org>
To: Theodore Tso <tytso@....edu>
Cc: Dave Kleikamp <shaggy@...tin.ibm.com>,
ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] Get rid of extents mount option - try 2
On Sat, 7 Oct 2006 13:20:27 -0400
Theodore Tso <tytso@....edu> wrote:
> > Also, do we update the superblock in every transaction that creates or
> > deletes a file? Otherwise, how do we guarantee the count is accurate
> > after replaying the journal?
>
> Yes, we do. The number of free inodes has to be kept up-to-date,
> after all, so the superblock is marked dirty and as being part of the
> transaction.
Actually we cheat, and we don't keep the superblock free inodes counter up
to date in real time. Done for CPU consumptions reasons, but it was
perhaps a false optimisation, given that we still have a system-wide
inode_lock.
The free inode count is already triply redundant: inode table scan, inode
bitmap scan, ext4_group_desc.bg_free_inodes_count. Making it quadruply
redundant seemed a bit over the top.
At runtime the definitive free-inodes count is the sum of the
per-blockgroup free-inode counts. On clean shutdown we regenerate that and
write it into the superblock.
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists