RFC: root mount enhancement (round 2)

Marcel Moolenaar xcllnt at mac.com
Wed Aug 25 19:09:08 UTC 2010


On Aug 25, 2010, at 11:18 AM, Garrett Cooper wrote:

> On Wed, Aug 25, 2010 at 8:58 AM, Marcel Moolenaar <xcllnt at mac.com> wrote:
>> Summary of round 1:
> 
> ...
> 
>> To re-iterate: the logic is recursive. After mounting some file system
>> as root, the kernel will follow the directives in /.mount.conf (if the
>> file exists) for remounting the root file system. At each iteration the
>> kernel will remount devfs under /dev and remount the current root file
>> system under /.mount within the new root file system.
> 
>    I like the proposal, but like Ed, I do have a concern with
> infinite recursion. Should a breadcrumb be added to prevent infinite
> recursion with the mounts, or is it game over, egg on your face, if
> you create an infinite recursion situation?

Since we have a trail of file systems (by virtue of mounting the
previous root under the new root at /.mount), we should be able
to detect when we're about to mount from a device previously used
to mount from. Alternatively or on top of that, we can have a
global limit on the recursion depth. Unless this is something we
want to control through /.mount.conf, I don't think it's an item
that needs to be closed or nailed down before we can move ahead.

Put differently: I can implement both to start with...

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the freebsd-arch mailing list