Delete a directory, crash the system

cpghost cpghost at
Sun Jul 28 14:47:12 UTC 2013

On 07/27/13 21:12, cpghost wrote:
> A more robust file system would halt all processes, and perform
> an in-kernel fsck on the filesystem and its internal (in-memory)
> structures to repair the damage... and THEN resume the processes.
> However, this is a major project, and we don't have a self-healing
> filesystem / kernel (... yet). ;-)
> -cpghost.

If we think this further, we may as well start introducing
some elements of self-healing or at least self-inspecting in
the kernel.

How about, for example, a kernel thread that wakes up periodically,
walks through VFS structures, and checks their integrity? Perhaps
also verifying the underlying inodes as well? Think background
fsck, but within the kernel and for kernel structures themselves.

Others parts of the kernel could as well self-inspect for
consistency with a periodic kernel thread. Some parts are
easier than others, so I don't think we could also walk the
VM structures (if those are corrupt, even the repair-thread
will be running amok). But save for that, most parts of the
kernel could use some periodic consistency checking.

Make that checking optional via a sysctl(8), and it won't
even cost performance.


Cordula's Web.

More information about the freebsd-questions mailing list