windows-smb-lock-timeouts-20080228
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 28 Feb 2008 17:16:28 +0000 (17:16 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 28 Feb 2008 17:16:28 +0000 (17:16 +0000)
commite9f7894e3576ef9e01234966f7869440f1823718
tree0e8ebbcd9dbd1435aa51e7d384d7a40602ede55f
parent023d3f3bae273d7af16d52fd0c468fc05653abe5
windows-smb-lock-timeouts-20080228

LICENSE MIT

Attempts to open files which are already write-locked by another
client took forever to return a lock not granted error.  This
was because cm_Analyze() would retry the lock request for up to
the RDRtimeout in response to the EAGAIN error.  The problem
was that cm_IntSetLock() was not setting the CM_REQ_NORETRY flag.

While examining this issue, discovered two other things:

(1) the infinite wait logic on lock request processing was broken
(2) the cancel outstanding lock request logic wasn't implemented
(3) cm_Analyze() would put the thread to sleep even when retries
    were not permitted.

Also removed a number of compile time warnings.
src/WINNT/afsd/cm.h
src/WINNT/afsd/cm_conn.c
src/WINNT/afsd/cm_dcache.h
src/WINNT/afsd/cm_vnodeops.c
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb.h
src/WINNT/afsd/smb3.c