tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Autoconfiguring root device and fstab(5) (wedges?)

On Mon, Mar 28, 2011 at 12:46:47PM -0400, der Mouse wrote:
> >>> Can't we move the [from_mount] logic from mount(8) to getfsent(3)
> >>> internal?
> >> It should be easy enough to teach fsck(8) [...].  I am not keen on
> >> moving the logic to getfsent(3), because that's just a file parser,
> >> independent of system state.
> That's what it is now.  I'm not convinced it necessarily should remain
> so.
> It seems to me that the alternatives are:
> 1) Drop "from_mount" entirely.
> 2) What we have now: library routines know nothing about from_mount;
>     programs that want to handle it have to do so on their own.
> 3) getfsent(3) handles from_mount.
> 4) getfsent_bis(3) (or whatever name) is added, which does getfsent
>     plus mapping from_mount, possibly more in the future.
> 5) handle_from_mount(3) (or whatever name) is added, which handles the
>     mapping.
> I don't like (2) because it leads to code duplication: multiple
> programs end up handling from_mount, each of them doing it slightly
> differently, with slightly different semantics (perhaps by design,
> perhaps by bugs).
> (3) is the cleanest in some senses, in that it means programs don't
> need any code changes to take advantage of from_mount.
> (4) and (5) (which are pretty much the same in most senses) satisfy the
> desire to avoid code duplication and the desire to leave gtefsent(3) as
> a pure file parser, but programs need to explicitly call them.
> (1) is an option in a sense.  I'm not sure I like it, but I'm not sure
> I don't, either - it's not clear to me what desire from_mount exists to
> satisfy, so I have no real idea what the price of dropping it would be.
> Presumably someone saw some need, or it wouldn't be there....

Think you have a complete, post-configured userland FS image and
testing it via NFS.  Then you decide to write it onto some media
(ROM, CF, SD, ...).  You have to modify /etc/fstab.  The problem
is the mount root information is written in multiple places.  This
is quite a broken design IMO.

Home | Main Index | Thread Index | Old Index