mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
This contains the SMB1-specific brlock logic. Right now our core brlock code has specialized code to deal with pending locks. For dealing with pending requests waiting for something nowadays we recommend to use tevent_req. This code also provides the basis to remove the SMB1 special case handling from the core logic, isolating protocol features specific to SMB1 and not exposed in SMB2 in SMB1-specific code. The core brlock code will not see blocking locks anymore. Instead, the code in this patch will always immediately fail and take care of the retries and timeouts. Retries are implemented by a dbwrap_watch_record_send on the corresponding locking.tdb entry. A later commit will make unlocks trigger wakeups there. I chose locking.tdb and not brlock itself to simplify the implementation. We already have oplock break watchers on locking.tdb, this will only add one more. This might lead to spurious wakeups, but they are taken care of by careful retries. An advantage of doing that is the implicit handling of a killed blocker PID through dbwrap_watch, obsoleting brl_revalidate. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>