Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 2013 16:47:01 +0200
From:      cpghost <cpghost@cordula.ws>
To:        David.I.Noel@gmail.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Delete a directory, crash the system
Message-ID:  <51F52EE5.2020604@cordula.ws>
In-Reply-To: <51F41BAF.8070506@cordula.ws>
References:  <CAHAXwYDPMrdY-TP-5T1_6M_ot4gY09jo2_Wi_REOmE=%2Bu%2B_QuQ@mail.gmail.com> <CAGwOe2byRc4LVsyxvTJgxNGCbhvOEaeDXjmFJ7DoXThPQe1bcQ@mail.gmail.com> <CAHAXwYCj9AV8ZcDffNNGx-ivL=h_TK9zLQRTPknArX25HSfEag@mail.gmail.com> <CAGwOe2YCDRqHudovDB_Kz9WHppvB8v2L%2B0gkDnWgG88bgZTKSA@mail.gmail.com> <CAHAXwYCnRDQqgRcvaEE1BmSJYYOidoQzzUoHX_QWdyJzYO3kKw@mail.gmail.com> <51F3F290.9020004@cordula.ws> <CAHAXwYA7WfYP8OZBVf47xRsDp9N01U3rPLZwwj7PFqkPxm3oag@mail.gmail.com> <51F41BAF.8070506@cordula.ws>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51F52EE5.2020604>