SoftUpdates's softdep_mount: Why do we need to recompute the superblock summary when bgfsck is there?

Xin LI delphij at frontfree.net
Sat Feb 12 08:00:37 PST 2005


Hi,

When a FFS is SoftUpdates enabled and was incorrectly dismounted,
the mount process will recompute the superblock summary
(fs->fs_cstotal) by traversing every cylinder group and accumulate
the summary.

While this approach will guarantee the correctness of the summary,
it can lead to a painful latency of mount() when the volume is
very big.  With background fsck, I think this can be splited off
the softdep_mount() call with the following background fsck process:

	- When mounting the file system, and when we know that
	  background fsck *would* be run, we skip the recomputation
	  process.  (recompute only if no background fsck can be
	  run, or is explicitly specified)
	- During pass5 of fsck_ffs, the newly generated cstotal is
	  then computed as deltas against the original snapshot's
	  summary.  Then, apply the delta to the current number.
	- Maintain the superblock summary by sync'ing it
	  periodically, so it won't lag behind too much upon
	  a crash.

Would this improve the situation?

Cheers,
-- 
Xin LI <delphij frontfree net>	http://www.delphij.net/
See complete headers for GPG key and other information.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20050213/d1961301/attachment.bin


More information about the freebsd-fs mailing list