tridge at samba.anu.edu.au
Tue Nov 10 02:10:19 GMT 1998
> 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.
I was thinking of having just one vfs table, unless configured with
Once we have nice autoconf tests for dlopen() and we have some
experience with this on several platforms then we can think about
having it enabled by default.
meanwhile, users like yourself who need this capability can configure
with --with-dynamic-vfs and use it now.
> 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()
and stat! read and write are the easy ones, the hard one is stat. You
need to get the size right. we also need lseek and truncate.
speaking of seek, it might be good to put pread() and pwrite() in the
vfs ops and get rid of read and write. Then on systems without pread
and pwrite we use sys_pread() which would do a lseek and a read.
This would lower the number of system calls by 1 (which can be quite
significant) and is a more natural fit for a SMB server as SMB has no
strong concept of the "current file position". (in fact, the current
pos is available via a couple of calls, but it isn't used as far as I
More information about the samba-technical