From owner-freebsd-fs@FreeBSD.ORG Wed Sep 8 22:32:59 2010 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFA6910656AA for ; Wed, 8 Sep 2010 22:32:59 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 94D0F8FC1E for ; Wed, 8 Sep 2010 22:32:59 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 009351FFC36; Wed, 8 Sep 2010 22:13:19 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id AA55684525; Thu, 9 Sep 2010 00:13:19 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alfred Perlstein References: <20100908180333.GG69795@elvis.mu.org> Date: Thu, 09 Sep 2010 00:13:19 +0200 In-Reply-To: <20100908180333.GG69795@elvis.mu.org> (Alfred Perlstein's message of "Wed, 8 Sep 2010 11:03:33 -0700") Message-ID: <86fwxjlw8w.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: fs@freebsd.org Subject: Re: leverage pseudofs for autofs? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2010 22:32:59 -0000 Alfred Perlstein 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