leverage pseudofs for autofs?
Dag-Erling Smørgrav
des at des.no
Wed Sep 8 22:32:59 UTC 2010
Alfred Perlstein <alfred at freebsd.org> writes:
> The basic requirements of autofs are:
>
> 1) In-memory filesystem.
> 2) if a lookup is done for a non-existant dir
> entry then block the process. (unless it's
> "special" ie. the actual automounter).
> 3) for readdir, do some magic to send requests
> back to userspace to "fill in" a dynamic listing.
> basically, vop_readdir will optionally dispatch
> back to userland for this.
>
> I'd like to reduce code duplication. Pseudofs looks
> like a great starting point.
You can probably use the pseudofs code as a starting point for autofs,
but I don't think it's a good idea to build autofs on top of pseudofs,
unless you start by greatly generalizing pseudofs: instead of
pfstype_procdir, you'd have pfstype_dynamic and custom callbacks to
handle readdir and lookup. That actually sounds like a good idea... a
lot of work, though.
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the freebsd-fs
mailing list