On Sat, 7 Oct 2006 13:20:27 -0400 Theodore Tso <tytso@xxxxxxx> 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html