summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-02-03 15:40:23 -0800
committerTim Prouty <tprouty@samba.org>2009-02-09 23:47:45 -0800
commit17eba16bad9b20518a5d336bc751e749a587ec68 (patch)
tree6c49a7586bb5efc58f418b0d45b0177e72ff7f13 /source3/include
parentc6f1f055fdeee29ad7c5b2ae9909e8f1b1a7daec (diff)
downloadsamba-17eba16bad9b20518a5d336bc751e749a587ec68.tar.gz
samba-17eba16bad9b20518a5d336bc751e749a587ec68.tar.bz2
samba-17eba16bad9b20518a5d336bc751e749a587ec68.zip
s3 oplocks: Add capabilites flags field to the kernel_oplocks struct
Here is a short description for each of the new capability flags: KOPLOCKS_LEVEL2_SUPPORTED: Level 2 oplocks are supported natively in the kernel. KOPLOCKS_DEFERRED_OPEN_NOTIFICATION: The kernel notifies deferred openers when they can retry the open. KOPLOCKS_TIMEOUT_NOTIFICATION: The kernel notifies smbds when an oplock break times out. KOPLOCKS_OPLOCK_BROKEN_NOTIFICATION: The kernel notifies smbds when an oplock is broken.
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/include/smb.h17
2 files changed, 18 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index ceea97bf56..f553f7625e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6898,6 +6898,7 @@ bool set_file_oplock(files_struct *fsp, int oplock_type);
void release_file_oplock(files_struct *fsp);
bool remove_oplock(files_struct *fsp);
bool downgrade_oplock(files_struct *fsp);
+bool should_notify_deferred_opens(void);
void reply_to_oplock_break_requests(files_struct *fsp);
void process_oplock_async_level2_break_message(struct messaging_context *msg_ctx,
void *private_data,
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 557489f211..bef0fd177b 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1689,9 +1689,26 @@ enum smbd_capability {
LEASE_CAPABILITY
};
+/*
+ * Kernel oplocks capability flags.
+ */
+
+/* Level 2 oplocks are supported natively by kernel oplocks. */
+#define KOPLOCKS_LEVEL2_SUPPORTED 0x1
+
+/* The kernel notifies deferred openers when they can retry the open. */
+#define KOPLOCKS_DEFERRED_OPEN_NOTIFICATION 0x2
+
+/* The kernel notifies smbds when an oplock break times out. */
+#define KOPLOCKS_TIMEOUT_NOTIFICATION 0x4
+
+/* The kernel notifies smbds when an oplock is broken. */
+#define KOPLOCKS_OPLOCK_BROKEN_NOTIFICATION 0x8
+
struct kernel_oplocks_ops;
struct kernel_oplocks {
const struct kernel_oplocks_ops *ops;
+ uint32_t flags;
void *private_data;
};