diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-06-10 13:38:07 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-06-10 13:38:07 +0000 |
commit | 52cb05678a9b08b5aa7dbe13ae6b54ff9ee4ecac (patch) | |
tree | 3d8dfdc81837b743cbfd383b6f9203df5e4c5285 /source3/include | |
parent | a9a512192d05d6559d0315be96e0bfcf8800f69e (diff) | |
download | samba-52cb05678a9b08b5aa7dbe13ae6b54ff9ee4ecac.tar.gz samba-52cb05678a9b08b5aa7dbe13ae6b54ff9ee4ecac.tar.bz2 samba-52cb05678a9b08b5aa7dbe13ae6b54ff9ee4ecac.zip |
continued the split of the kernel level oplocks code into a more
modular form. In this pass I added oplock_irix.c and added a "struct
kernel_oplocks" that describes a kernel oplock implementation.
(This used to be commit b5ceab810292602ea9a81696c20a781c16b706c2)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/proto.h | 13 | ||||
-rw-r--r-- | source3/include/smb.h | 14 |
2 files changed, 21 insertions, 6 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 9563b432fd..4d57740877 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1339,6 +1339,7 @@ BOOL lp_stat_cache(void); BOOL lp_allow_trusted_domains(void); BOOL lp_restrict_anonymous(void); BOOL lp_host_msdfs(void); +BOOL lp_kernel_oplocks(void); int lp_os_level(void); int lp_max_ttl(void); int lp_max_wins_ttl(void); @@ -1491,8 +1492,6 @@ int lp_default_server_announce(void); int lp_major_announce_version(void); int lp_minor_announce_version(void); void lp_set_name_resolve_order(char *new_order); -void lp_set_kernel_oplocks(BOOL val); -BOOL lp_kernel_oplocks(void); int lp_security_mask(int snum); int lp_force_security_mode(int snum); int lp_dir_security_mask(int snum); @@ -3277,8 +3276,6 @@ BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op); #if OLD_NTDOMAIN int32 get_number_of_exclusive_open_oplocks(void); -BOOL setup_kernel_oplock_pipe(void); -BOOL open_oplock_ipc(void); BOOL receive_local_message(fd_set *fds, char *buffer, int buffer_len, int timeout); BOOL set_file_oplock(files_struct *fsp, int oplock_type); void release_file_oplock(files_struct *fsp); @@ -3289,7 +3286,13 @@ BOOL oplock_break_level2(files_struct *fsp, BOOL local_request, int token); BOOL request_oplock_break(share_mode_entry *share_entry, SMB_DEV_T dev, SMB_INO_T inode); BOOL attempt_close_oplocked_file(files_struct *fsp); -void check_kernel_oplocks(void); +BOOL init_oplocks(void); +#endif + +/*The following definitions come from smbd/oplock_irix.c */ + +#if OLD_NTDOMAIN +struct kernel_oplocks *irix_init_kernel_oplocks(void) ; #endif /*The following definitions come from smbd/password.c */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 91f0e04b48..d2c79e3b53 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1598,6 +1598,7 @@ extern int chain_size; #define OPLOCK_BREAK_INODE_OFFSET (OPLOCK_BREAK_DEV_OFFSET + sizeof(SMB_DEV_T)) #define OPLOCK_BREAK_MSG_LEN (OPLOCK_BREAK_INODE_OFFSET + sizeof(SMB_INO_T)) +#define KERNEL_OPLOCK_BREAK_CMD 0x2 #define LEVEL_II_OPLOCK_BREAK_CMD 0x3 /* @@ -1618,13 +1619,24 @@ extern int chain_size; * +----+--------+--------+ */ -#define KERNEL_OPLOCK_BREAK_CMD 0x2 #define KERNEL_OPLOCK_BREAK_DEV_OFFSET 2 #define KERNEL_OPLOCK_BREAK_INODE_OFFSET (KERNEL_OPLOCK_BREAK_DEV_OFFSET + sizeof(SMB_DEV_T)) #define KERNEL_OPLOCK_BREAK_MSG_LEN (KERNEL_OPLOCK_BREAK_INODE_OFFSET + sizeof(SMB_INO_T)) #endif /* HAVE_KERNEL_OPLOCKS_IRIX */ +/* if a kernel does support oplocks then a structure of the following + typee is used to describe how to interact with the kernel */ +struct kernel_oplocks { + BOOL (*receive_message)(fd_set *fds, char *buffer, int buffer_len); + BOOL (*set_oplock)(files_struct *fsp, int oplock_type); + void (*release_oplock)(files_struct *fsp); + BOOL (*parse_message)(char *msg_start, int msg_len, SMB_INO_T *inode, SMB_DEV_T *dev); + BOOL (*msg_waiting)(fd_set *fds); + int notification_fd; +}; + + #define CMD_REPLY 0x8000 #include "smb_macros.h" |