From owner-freebsd-fs@FreeBSD.ORG Wed Sep 8 18:22:37 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 B46EE10656AA; Wed, 8 Sep 2010 18:22:37 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 92E148FC0A; Wed, 8 Sep 2010 18:22:37 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id 885131A3FBB; Wed, 8 Sep 2010 11:03:33 -0700 (PDT) Date: Wed, 8 Sep 2010 11:03:33 -0700 From: Alfred Perlstein To: fs@freebsd.org, des@freebsd.org Message-ID: <20100908180333.GG69795@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: 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 18:22:37 -0000 fs & DES, I'm looking at reimplementing autofs. I've had my eye on psuedofs as a base for autofs since it seems like I can override most of the methods. At a glance what has me wondering is that there seems to be some code in the pseudofs base that checks for processes and traverses allproc. For instance "pfs_readdir()" implies some sort of tie between the number of dir entries and the reading of the directory, obviously for autofs this would be different. I do not need this in autofs and can probably get around this by overloading those vnops entries in my filesystem switch. 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. Am I missing some tightly coupled issue that makes this a non-starter? Would you be open to adding hooks if autofs needs them? Should I be looking elsewhere or just starting from scratch? thank you! -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 .- FreeBSD committer