From 5864551aef50295addd1c8aa690a52870f70626d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 1 Oct 1997 23:32:22 +0000 Subject: OPLOCK CHECK-IN - oplocks are now *OPERATIONAL* !!!! Yipeee. At least as far as I can check in a short time :-). local.h: Changed OPLOCK_BREAK_TIMEOUT to 30 seconds. locking.c: Big changes to delete oplocks on a share mode entry. proto.h: updated. reply.c: Added oplock break code in lockingX reply & readbraw reply. server.c: Add batch oplock code. Force server shutdown if client fails to respond to oplock break. smb.h: Fix silly slow share mode oplock define bug. status.c: Add oplock status info. Jeremy (jallison@whistle.com) (This used to be commit 4c83d37239f15f855fc10f01d7b4bf4217fb9eda) --- source3/include/local.h | 2 +- source3/include/proto.h | 2 ++ source3/include/smb.h | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'source3/include') diff --git a/source3/include/local.h b/source3/include/local.h index e7eff2a300..3ce75eeb4e 100644 --- a/source3/include/local.h +++ b/source3/include/local.h @@ -162,6 +162,6 @@ /* Timout (in seconds) to wait for an oplock breal message to return. */ -#define OPLOCK_BREAK_TIMEOUT 120 +#define OPLOCK_BREAK_TIMEOUT 30 #endif diff --git a/source3/include/proto.h b/source3/include/proto.h index 7a1ccc626f..ac81f8cb37 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -300,12 +300,14 @@ int get_share_modes(int cnum, share_lock_token token, uint32 dev, uint32 inode, min_share_mode_entry **old_shares); void del_share_mode(share_lock_token token, int fnum); BOOL set_share_mode(share_lock_token token, int fnum, uint16 port, uint16 op_type); +BOOL remove_share_oplock(int fnum, share_lock_token token); BOOL lock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token *ptok); BOOL unlock_share_entry(int cnum, uint32 dev, uint32 inode, share_lock_token token); int get_share_modes(int cnum, share_lock_token token, uint32 dev, uint32 inode, min_share_mode_entry **old_shares); void del_share_mode(share_lock_token token, int fnum); BOOL set_share_mode(share_lock_token token,int fnum, uint16 port, uint16 op_type); +BOOL remove_share_oplock(int fnum, share_lock_token token); /*The following definitions come from mangle.c */ diff --git a/source3/include/smb.h b/source3/include/smb.h index c8de001fda..509c1e1cf1 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -515,9 +515,9 @@ struct connect_record #define SMF_HEADER_LENGTH 10 #ifdef USE_OPLOCKS -#define SMF_ENTRY_LENGTH 16 -#else /* USE_OPLOCKS */ #define SMF_ENTRY_LENGTH 20 +#else /* USE_OPLOCKS */ +#define SMF_ENTRY_LENGTH 16 #endif /* USE_OPLOCKS */ /* -- cgit