leverage pseudofs for autofs?
Alfred Perlstein
alfred at freebsd.org
Wed Sep 8 18:22:37 UTC 2010
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
More information about the freebsd-fs
mailing list