svn commit: samba r17105 - in branches/SAMBA_3_0/source: locking smbd

jra at samba.org jra at samba.org
Tue Jul 18 01:05:57 GMT 2006


Author: jra
Date: 2006-07-18 01:05:51 +0000 (Tue, 18 Jul 2006)
New Revision: 17105

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

Log:
Fix the race Volker found - we had a non-locked
region between detecting a pending lock was needed
and when we added the blocking lock record. Make
sure that we hold the lock over all this period.
Removed the old code for doing blocking locks on
SMB requests that never block (the old SMBlock
and friends).
Discovered something interesting about the strange
NT_STATUS_FILE_LOCK_CONFLICT return. If we asked
for a lock with zero timeout, and we got an error
of NT_STATUS_FILE_LOCK_CONFLICT, treat it as though
it was a blocking lock with a timeout of 150 - 300ms.
This only happens when timeout is sent as zero and
can be seen quite clearly in ethereal. This is the
real replacement for old do_lock_spin() code.
Re-worked the blocking lock select timeout to correctly
use milliseconds instead of the old second level
resolution (far too coarse for this work).
Jeremy.

Modified:
   branches/SAMBA_3_0/source/locking/brlock.c
   branches/SAMBA_3_0/source/locking/locking.c
   branches/SAMBA_3_0/source/smbd/blocking.c
   branches/SAMBA_3_0/source/smbd/process.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/trans2.c


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


More information about the samba-cvs mailing list