Returning "fake" directories via VFS

Andreas Lund floyd at atc.no
Tue Mar 19 16:33:12 GMT 2002


Hi again :-)

I'm trying to write a VFS module to handle a jukebox media changer, the goal
is to be able to "name" each slot no. and to cache the directory contents of
each medium so that a client can browse the changer for a particular file and
then have the appropriate medium automatically mounted only when the client
tries to read the contents of a file.

So far, I've gotten my module to return "fake" dirent structures that Samba
will accept without crashing or complaining. I put the (non existant but
otherwise valid) filename in ->d_name BUT for some odd reason the filenames
appear as empty strings both in the Samba debug logs and on the client. 

Does Samba do another system call to somehow "confirm" the filename or
anything? Or does Samba talk to the OS directly and not just to the VFS
wrapper, making this sort of thing impossible? I can't figure out exactly
where the filename is replaced with an empty string, all I know is that it
never makes it into any of the debug logs :-/

All information about permissions, size, dates is displayed properly on the
client so my "fake" stat() code appears to be working.


--
Andreas Lund (floyd at atc.no)
Tel: +47 90.07.71.62 / +47 63.88.33.56
Ano-Tech Computers (http://www.atc.no/)
** Never send a human to do a machine's job  **





More information about the samba-technical mailing list