diff options
author | Jeremy Allison <jra@samba.org> | 2001-10-20 21:59:34 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-10-20 21:59:34 +0000 |
commit | 88b55f47b4914f7d390939e4394ec3edd42be91f (patch) | |
tree | 3153cf9871570a55fe1476b6ad45d9c5b6c72846 /source3/include | |
parent | e5868e1f57c1de537a7385a81d23671a727af5f5 (diff) | |
download | samba-88b55f47b4914f7d390939e4394ec3edd42be91f.tar.gz samba-88b55f47b4914f7d390939e4394ec3edd42be91f.tar.bz2 samba-88b55f47b4914f7d390939e4394ec3edd42be91f.zip |
Move from timestamp to gen count file id's for finding oplocked files
in a tdb.
Jeremy.
(This used to be commit 058ae6b58f61ef46013dd076af3a84de5fbaaab1)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/smb.h | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index c25b48dde2..7cef5670bd 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -408,6 +408,7 @@ typedef struct files_struct time_t pending_modtime; int oplock_type; int sent_oplock_break; + unsigned long file_id; BOOL can_lock; BOOL can_read; BOOL can_write; @@ -557,13 +558,15 @@ struct interface }; /* struct returned by get_share_modes */ -typedef struct -{ - pid_t pid; - uint16 op_port; - uint16 op_type; - int share_mode; - struct timeval time; +typedef struct { + pid_t pid; + uint16 op_port; + uint16 op_type; + int share_mode; + struct timeval time; + SMB_DEV_T dev; + SMB_INO_T inode; + unsigned long share_file_id; } share_mode_entry; @@ -1409,19 +1412,18 @@ extern int chain_size; * * The form of this is : * - * 0 2 6 10 14 14+devsize 14+devsize+inodesize - * +----+--------+--------+--------+-------+--------+ - * | cmd| pid | sec | usec | dev | inode | - * +----+--------+--------+--------+-------+--------+ + * 0 2 2+pid 2+pid+dev 2+pid+dev+ino + * +----+--------+-------+--------+---------+ + * | cmd| pid | dev | inode | fileid | + * +----+--------+-------+--------+---------+ */ #define OPLOCK_BREAK_CMD 0x1 #define OPLOCK_BREAK_PID_OFFSET 2 -#define OPLOCK_BREAK_SEC_OFFSET (OPLOCK_BREAK_PID_OFFSET + sizeof(pid_t)) -#define OPLOCK_BREAK_USEC_OFFSET (OPLOCK_BREAK_SEC_OFFSET + sizeof(time_t)) -#define OPLOCK_BREAK_DEV_OFFSET (OPLOCK_BREAK_USEC_OFFSET + sizeof(long)) +#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_MSG_LEN (OPLOCK_BREAK_INODE_OFFSET + sizeof(SMB_INO_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)) #define KERNEL_OPLOCK_BREAK_CMD 0x2 #define LEVEL_II_OPLOCK_BREAK_CMD 0x3 @@ -1438,13 +1440,14 @@ extern int chain_size; * Form of this is : * * 0 2 2+devsize 2+devsize+inodesize - * +----+--------+--------+ - * | cmd| dev | inode | - * +----+--------+--------+ + * +----+--------+--------+----------+ + * | cmd| dev | inode | fileid | + * +----+--------+--------+----------+ */ #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)) +#define KERNEL_OPLOCK_BREAK_FILEID_OFFSET (KERNEL_OPLOCK_BREAK_INODE_OFFSET + sizeof(SMB_INO_T)) +#define KERNEL_OPLOCK_BREAK_MSG_LEN (KERNEL_OPLOCK_BREAK_FILEID_OFFSET + sizeof(unsigned long)) /* if a kernel does support oplocks then a structure of the following @@ -1453,7 +1456,7 @@ 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 (*parse_message)(char *msg_start, int msg_len, SMB_INO_T *inode, SMB_DEV_T *dev, unsigned long *file_id); BOOL (*msg_waiting)(fd_set *fds); int notification_fd; }; |