extfs at shutdown (was: Re: BETA3 showstoppers (read: critical bugs))

From: Don Lewis <truckman_at_FreeBSD.org>
Date: Sat, 11 Sep 2004 14:50:03 -0700 (PDT)
On  6 Sep, Matthias Andree wrote:

> - a mounted ext2 file system (read-only sufficient) still causes FreeBSD
>   to not flush its own ufs super blocks at shut down, causing an fsck
>   run at next reboot.
>   Workaround: umount all ext2 file systems before reboot/halt.

Ext2 abuses BUF_KERNPROC() through its LCK_BUF() macro to store the
contents of its private cache of group descriptors, inode and block
bitmaps, etc. in system buffers for the entire time that the file system
is mounted. These resources don't get synced with the rest of the file
system data, even during the final system sync, and the data isn't
written and the resources aren't released until the file system is
unmounted.

I think it is undesirable to defer writing a significant amount of
metadata until after the final filesystem sync.  I also think that fixed
size metadata caches (EXT2_MAX_GROUP_LOADED) for each mounted ext2 file
system is undesirable.  I think this metadata should be handled the same
was as ufs caches it.  Unfortunately this would be a fairly intrusive
change.

BTW, it looks like a bug to me that ext2_unmount() writes the superblock
before the other metadata.
Received on Sat Sep 11 2004 - 19:50:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:11 UTC