summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/locking.h19
-rw-r--r--source3/include/smb.h11
2 files changed, 14 insertions, 16 deletions
diff --git a/source3/include/locking.h b/source3/include/locking.h
index e675755839..f02d817133 100644
--- a/source3/include/locking.h
+++ b/source3/include/locking.h
@@ -42,33 +42,34 @@ struct lock_context {
struct server_id pid;
};
-/* The key used in the brlock database. */
+struct files_struct;
-struct lock_key {
- SMB_DEV_T device;
- SMB_INO_T inode;
+struct file_id {
+ /* we don't use SMB_DEV_T and SMB_INO_T as we want a fixed size here,
+ and we may be using file system specific code to fill in something
+ other than a dev_t for the device */
+ uint64_t devid;
+ uint64_t inode;
};
-struct files_struct;
-
struct byte_range_lock {
struct files_struct *fsp;
unsigned int num_locks;
BOOL modified;
BOOL read_only;
- struct lock_key key;
+ struct file_id key;
struct lock_struct *lock_data;
struct db_record *record;
};
#define BRLOCK_FN_CAST() \
- void (*)(SMB_DEV_T dev, SMB_INO_T ino, struct server_id pid, \
+ void (*)(struct file_id id, struct server_id pid, \
enum brl_type lock_type, \
enum brl_flavour lock_flav, \
br_off start, br_off size)
#define BRLOCK_FN(fn) \
- void (*fn)(SMB_DEV_T dev, SMB_INO_T ino, struct server_id pid, \
+ void (*fn)(struct file_id id, struct server_id pid, \
enum brl_type lock_type, \
enum brl_flavour lock_flav, \
br_off start, br_off size)
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 2375d47fdc..abdb3f37ba 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -422,7 +422,7 @@ struct fd_handle {
* DELETE_ON_CLOSE is not stored in the share
* mode database.
*/
- unsigned long file_id;
+ unsigned long gen_id;
};
struct event_context;
@@ -486,8 +486,7 @@ typedef struct files_struct {
struct fd_handle *fh;
unsigned int num_smb_operations;
uint16 rap_print_jobid;
- SMB_DEV_T dev;
- SMB_INO_T inode;
+ struct file_id file_id;
SMB_BIG_UINT initial_allocation_size; /* Faked up initial allocation on disk. */
mode_t mode;
uint16 file_pid;
@@ -756,8 +755,7 @@ struct share_mode_entry {
* NTCREATEX_OPTIONS_PRIVATE_DENY_FCB for
* smbstatus and swat */
struct timeval time;
- SMB_DEV_T dev;
- SMB_INO_T inode;
+ struct file_id id;
unsigned long share_file_id;
uint32 uid; /* uid of file opener. */
uint16 flags; /* See SHARE_MODE_XX above. */
@@ -787,8 +785,7 @@ Offset Data length.
struct share_mode_lock {
const char *servicepath; /* canonicalized. */
const char *filename;
- SMB_DEV_T dev;
- SMB_INO_T ino;
+ struct file_id id;
int num_share_modes;
struct share_mode_entry *share_modes;
UNIX_USER_TOKEN *delete_token;