Filtering items in readdir() with own fs

Jille Timmermans jille at quis.cx
Thu Sep 11 19:59:56 UTC 2008


Hello all,

<information skipable="yes">
I am trying to create a filesystem that works exactly like nullfs, but
hides all .svn dirs (and contents) (Yes, I started with svn cp).
I've got it working so far that it denies that the dirs and contents
exist (grep isn't complaining; so I can finally grep -r through the source).
But it would be nice if I can also hide the .svn dirs in dir listings.
</introduction>

<problem>
I have been looking through a few existing filesystems (unionfs,
fdescfs, xfs, devfs).
None gave me a good way for hiding specific entries in the listing.
With some help of unionfs I have created a direct-pass-through using
VOP_READDIR(), but I can't filter it with that.
I tried using some xfs code, but didn't get any result with that.
</problem>

<question>
Can anyone give me a hint on where to start looking for code that could
be used with filtering functionality ?
Any file or function ?
</question>

Thanks in advance,
-- Jille


More information about the freebsd-hackers mailing list