vfs (fwd)

Tim Potter tpot at acsys.anu.edu.au
Tue Nov 10 01:35:57 GMT 1998


Oops.  Only sent it to tridge.

---------- Forwarded message ----------
Date: Tue, 10 Nov 1998 12:35:12 +1100 (EST)
From: Tim Potter <tpot at acsys.anu.edu.au>
To: Andrew Tridgell <tridge at samba.anu.edu.au>
Subject: Re: vfs

> There are a few of things that need changing before production use
> though:
> 
> 1) for the first release I think the dl stuff should only be enabled
> if you use configure with --with-dynamic-vfs. Your internal structures
> will be used in either case, it just won't enable loading of external
> modules. For me the big win with this stuff is the much better
> internal structure of the code, with the dynamic loading being a nice
> bonus :-)

OK.  This will mean that you can only have one vfs linked in, or perhaps
provide some other method for doing it at compile time - perhaps something
like Space.c in the network drivers for the linux kernel with a table of
function pointers.

> 3) the SSL stuff in vfs_write_data looks wrong. SSL only applies to
> sockets, and the vfs stuff only applies ot files. This indicates that
> there is still some entanglement in the code with socket vs. file
> issues. The problem was probably caused by transfer_file() which tries
> to be a smart transfer function for file->socket and socket->file. I
> think we will need to split it and have separate functions for the two
> directions. Or get rid of it completely.

Hmm...  I ended up keeping (and slightly modifying) the vfs_write_data()
function because I didn't want to rewrite the whole read data in chunks
and write it out again thing.  It seemed to be working OK and I didn't
want to touch it.  I'll have another look at the code.  There is probably
a way of working around this problem.

> Finally, if you are looking for a really useful example module then I
> think a module that does CR/LF conversion would be very popular! We've
> wanted that for a while, but it was just too messy to put in the main
> code. Now we have a clean way of getting it in.

Yep - that's why I put in the default_vfs_ops structure so other modules
could inherit some default behaviour and only override what they need.  In
the case of the cr/lf conversion, it would only be the read() and write()
functions.


tpot

> 
> Cheers, Tridge
> 




More information about the samba-technical mailing list