svn commit: samba r10011 - in branches/tmp/vl-cluster/source: include locking smbd

vlendec at samba.org vlendec at samba.org
Sat Sep 3 21:23:04 GMT 2005


Author: vlendec
Date: 2005-09-03 21:23:02 +0000 (Sat, 03 Sep 2005)
New Revision: 10011

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10011

Log:
This is a larger Saturday-night checkin. It compiles, but I did not run it
once, this will follow tomorrow. So expect a stream of bugfix commits
tomorrow.

New habits would dictate that I send it to the list before applying it, but I
see my temporary branch a bit as my playground. Sorry :-)

This is a rewrite of locking.c. It gets rid of deferred_open.tdb, this time
hopefully deadlock-free. It inserts the deferred open records into the normal
share mode entry table. This adds a bit more load on that tdb, but as the load
on that is way too high for a cluster anyway I need to find other ways to do
it even with deferred_open.tdb around.

It also adds the concept of unused share mode entries in the record. Why that?
In a cluster, the sanity check of process_exists() is very difficult to
realize. So my idea is to have a separate locking file per open file. Every
process interested in an individual share mode entry sets a read lock on the
entry. process_exists() in get_share_modes() then would see if it can get a
write lock on the entry. If the table says that the entry is still in use, but
the write lock can be acquired, then the process is obviously dead. That also
implies that share mode entries may not be moved around in the file.

Maybe for large tdb-mmap'ed share mode lists this might even be a speedup by
removing memcpy operations. Hmmmm. No. tdb_store moves stuff around anyway. We
need a tdb_fetch_lock giving a direct handle on the mmap'ed region :-).

I'll test this for use in a non-clustered Samba as well, maybe it's an
alternative implementation for huge hosts with fast directory operations to
reduce contention on locking.tdb.

Volker

Modified:
   branches/tmp/vl-cluster/source/include/smb.h
   branches/tmp/vl-cluster/source/locking/locking.c
   branches/tmp/vl-cluster/source/smbd/close.c
   branches/tmp/vl-cluster/source/smbd/open.c
   branches/tmp/vl-cluster/source/smbd/oplock.c
   branches/tmp/vl-cluster/source/smbd/trans2.c


Changeset:
Sorry, the patch is too large (1917 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10011


More information about the samba-cvs mailing list