Date: Wed, 8 Sep 2010 11:03:33 -0700 From: Alfred Perlstein <alfred@freebsd.org> To: fs@freebsd.org, des@freebsd.org Subject: leverage pseudofs for autofs? Message-ID: <20100908180333.GG69795@elvis.mu.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100908180333.GG69795>