John E. Malmberg
wb8tyw at qsl.net
Thu Oct 26 04:42:35 GMT 2000
"Ulf Bertilsson" <ulf.bertilsson#adcomdata.no> wrote:
> > My target platform, OpenVMS is somewhat Posix
> > compliant, but not enough to build SAMBA with out
> > some help to the runtime library. This help does
> > include some overhead.
> Same as me, AmigaOS don't have any multiuser
> concept at all. Olaf Barthel (Also the main man
> behind the 3.5 upgrade) made an custom 'Wrapper'
> for Samba, linking calls to 'AmigaOS' friendly calls.
> I gues something like this has to be done for your
> platform as well.
> > > > I have not looked at the code base later than 2.0.6,
> > > > but there appear to be other performance
> > > > enhancements that should be both easier to
> > > > do, and yield far better results.
> > >
> > > Cool, anything that comes to your head first ?
> > I am seeing on the debug traces a lot of what appear to
> > be redundant translations from dos filenames to unix ones.
> Is this part of the "locking" ?
I do not think so. It seems to just be part of doing a directory lookup and
checking for 8.3 uniqueness.
> > And then I have to add a translation to VMS one
> > before using the file. Most of these seem to end
> > up calling the stat() function. Both the filename
> > translations and the stat() function have high
> > overhead for me. Especially the stat() function.
> Then we are in the same boat, we might learn from eash
> other ports. I think the AmigaOS related patches should
> be merged into the CVS soon (?)
> Might even prove useful.
> I hope to learn more Posix and C before I could work more
> with this. Any suggestion for a good book ?
All my books on learning C are pretty ancient. The problem is that a good
reference is a lousy tutorial, and a good tutorial is too simplified to be a
For POSIX or UNIX compliance I have a browser book mark at the pages for
"The Open Book" "Single Unix Standard" system headers.
They can be found at http://www.opengroup.org/ where you need to register
for access, but it is free for online browsing.
You can bookmark the internal pages so that you do not have to log in each
> Interesting times, are the OpenVMS wrapper in the
> current source ?
No. The OpenVMS wrapper routines are at
They were written to be general purpose, not just for SAMBA.
The actual changes that I have needed to make to the SAMBA 2.0.6 for
building it are:
The prompt for sending messages was hardcoded to end the message with
OpenVMS requires Control-Z. Coded the patch to allow CONFIG.H to override
the prompt string.
This replaces the pidfile_create() function. SMBD uses this to prevent
multiple parent daemon process from running. Since on OpenVMS, all of the
processes are parents, this new function does nothing.
This replaces the locking_slow.c module with one that is tailored to OpenVMS
using the SAMBA lock files.
An enhancement for a future version of OpenVMS is to change connection.c to
take out a SYS$ENQW() lock on the share, and then use an OpenVMS module to
replace the locking module to take out sublocks for the files on the master
(This is pending what future versions of connection.c look like :-)
This replaces the lp_load() routine in the SAMBA UNIX code, checks logical
names for the VMS specific options, and then calls the SAMBA lp_load()
This allows the VMS specific logical names to be scanned at the same time
that smb.conf is checked for changes.
The fcntl() locking I implemented in OpenVMS requires that the locked record
exists. SAMBA was checking to make sure in the case of a file create, that
there were no records in the file. Can not use that check on OpenVMS.
Bug fix to allow running the SMBD daemon interactively in debug for multiple
runs. This condition only appears to be an issue on OpenVMS. On a UNIX
system it is unlikely that the process id would be used between runs.
This fix is not required for normal operation of SAMBA on OpenVMS.
Patch to only open files for write that the client requested write access
to. This was strongly requested by the OpenVMS community. It may or may
not have bad effects with SAMBA lock processing.
Patch to report the start offset of a file segment being transferred as part
of the debug information when the debug level is raised.
Intercepts calls to reply_special() and checks to see if it is a new
connection accept message. If so changes the process name to match. Then
calls the SAMBA reply_special() routine.
I have held off sending up DIFFs for most of these as they only affect the
VMS platform, and was waiting until I was up to building with the current
wb8tyw at qsl.network
More information about the samba-technical