summaryrefslogtreecommitdiff
path: root/source3/include/locking.h
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-29 09:30:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:52 -0500
commite8156439f24137b5418baad20a7f00f6949cfe29 (patch)
treeb2d6a876be7a2d7b763402e33e1653899430d48d /source3/include/locking.h
parentba0bce2c6f7298840e0d223a5f170b777b8c9d64 (diff)
downloadsamba-e8156439f24137b5418baad20a7f00f6949cfe29.tar.gz
samba-e8156439f24137b5418baad20a7f00f6949cfe29.tar.bz2
samba-e8156439f24137b5418baad20a7f00f6949cfe29.zip
r23183: Check in a change made by Tridge:
This replaces the internal explicit dev/ino file id representation by a "struct file_id". This is necessary as cluster file systems and NFS don't necessarily assign the same device number to the shared file system. With this structure in place we can now easily add different schemes to map a file to a unique 64-bit device node. Jeremy, you might note that I did not change the external interface of smb_share_modes.c. Volker (This used to be commit 9b10dbbd5de8813fc15ebbb6be9b18010ffe8139)
Diffstat (limited to 'source3/include/locking.h')
-rw-r--r--source3/include/locking.h19
1 files changed, 10 insertions, 9 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)