Date: Thu, 09 Sep 2010 00:13:19 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Alfred Perlstein <alfred@freebsd.org> Cc: fs@freebsd.org Subject: Re: leverage pseudofs for autofs? Message-ID: <86fwxjlw8w.fsf@ds4.des.no> In-Reply-To: <20100908180333.GG69795@elvis.mu.org> (Alfred Perlstein's message of "Wed, 8 Sep 2010 11:03:33 -0700") References: <20100908180333.GG69795@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein <alfred@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.=20 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 --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86fwxjlw8w.fsf>