summaryrefslogtreecommitdiffstats
path: root/source/include/smb.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-01-30 01:42:08 +0000
committerJeremy Allison <jra@samba.org>2003-01-30 01:42:08 +0000
commitd1e8991a76a57b7d96dd7db3c1d9bbf5b28da88e (patch)
treeb3cfdff0ec7b0b225dc4c90645562feb85cc31eb /source/include/smb.h
parentc32c1bccc27f10e2f44f3e7f3778aae38bba8f25 (diff)
downloadsamba-d1e8991a76a57b7d96dd7db3c1d9bbf5b28da88e.tar.gz
samba-d1e8991a76a57b7d96dd7db3c1d9bbf5b28da88e.tar.xz
samba-d1e8991a76a57b7d96dd7db3c1d9bbf5b28da88e.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.
Diffstat (limited to 'source/include/smb.h')
-rw-r--r--source/include/smb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/include/smb.h b/source/include/smb.h
index 3ca8d322899..8138555539a 100644
--- a/source/include/smb.h
+++ b/source/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.