summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-01-30 01:41:46 +0000
committerJeremy Allison <jra@samba.org>2003-01-30 01:41:46 +0000
commitb61f89826f2b7ee8ca7bd388b66c3f5b78ed3e60 (patch)
treecab03bdf0d9d7b204aec66583513bd96d10e5e4c /source3/include
parent812a531f4553c8eb2df572acd4fa42a6f91b3051 (diff)
downloadsamba-b61f89826f2b7ee8ca7bd388b66c3f5b78ed3e60.tar.gz
samba-b61f89826f2b7ee8ca7bd388b66c3f5b78ed3e60.tar.bz2
samba-b61f89826f2b7ee8ca7bd388b66c3f5b78ed3e60.zip
Fix for interesting resource constraint condition. When all opens are
level 2 and a request for open with no oplock is received then the smbd should send *synchronous* break messages, not asynchronous, otherwise it spins very rapidly, releasing the lock, sending the 'break to none' messages and then re-acquiring the lock before any other process has a chance to get the lock and remove it's own oplock (at least on linux). Jeremy (This used to be commit 33e3e863eb7f35b852384e689f3272784261fc39)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/smb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 3ca8d32289..8138555539 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1512,15 +1512,17 @@ extern int chain_size;
* +----+--------+-------+--------+---------+
*/
-#define OPLOCK_BREAK_CMD 0x1
#define OPLOCK_BREAK_PID_OFFSET 2
#define OPLOCK_BREAK_DEV_OFFSET (OPLOCK_BREAK_PID_OFFSET + sizeof(pid_t))
#define OPLOCK_BREAK_INODE_OFFSET (OPLOCK_BREAK_DEV_OFFSET + sizeof(SMB_DEV_T))
#define OPLOCK_BREAK_FILEID_OFFSET (OPLOCK_BREAK_INODE_OFFSET + sizeof(SMB_INO_T))
#define OPLOCK_BREAK_MSG_LEN (OPLOCK_BREAK_FILEID_OFFSET + sizeof(unsigned long))
+/* Message types */
+#define OPLOCK_BREAK_CMD 0x1
#define KERNEL_OPLOCK_BREAK_CMD 0x2
#define LEVEL_II_OPLOCK_BREAK_CMD 0x3
+#define ASYNC_LEVEL_II_OPLOCK_BREAK_CMD 0x4
/*
* Capabilities abstracted for different systems.