From fef617c31bd4a8be09449d6bc726c729ae758423 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 17 Oct 2004 02:55:47 +0000 Subject: r3012: added initial support for byte range locking in the posix vfs. This is enough for us to pass locktest, but does not yet support lock timeouts and some of the other esoteric features. (This used to be commit 58a92abd88f190bc60894a68e0528e95ae33fe39) --- source4/ntvfs/posix/vfs_posix.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'source4/ntvfs/posix/vfs_posix.h') diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h index 6819d01529d..e83f0479a91 100644 --- a/source4/ntvfs/posix/vfs_posix.h +++ b/source4/ntvfs/posix/vfs_posix.h @@ -51,6 +51,8 @@ struct pvfs_state { struct pvfs_file *open_files; struct pvfs_mangle_context *mangle_ctx; + + void *brl_context; }; @@ -115,6 +117,12 @@ struct pvfs_file { /* we need to remember the client pid that opened the file so SMBexit works */ uint16_t smbpid; + + /* a unique file key to be used for file locking */ + DATA_BLOB locking_key; + + /* we need this hook back to our parent for lock destruction */ + struct pvfs_state *pvfs; }; struct pvfs_mangle_context { @@ -147,11 +155,12 @@ struct pvfs_mangle_context { #define PVFS_RESOLVE_STREAMS (1<<1) /* flags in pvfs->flags */ -#define PVFS_FLAG_CI_FILESYSTEM (1<<0) /* the filesystem is case insensitive */ -#define PVFS_FLAG_MAP_ARCHIVE (1<<1) -#define PVFS_FLAG_MAP_SYSTEM (1<<2) -#define PVFS_FLAG_MAP_HIDDEN (1<<3) -#define PVFS_FLAG_READONLY (1<<4) -#define PVFS_FLAG_STRICT_SYNC (1<<5) +#define PVFS_FLAG_CI_FILESYSTEM (1<<0) /* the filesystem is case insensitive */ +#define PVFS_FLAG_MAP_ARCHIVE (1<<1) +#define PVFS_FLAG_MAP_SYSTEM (1<<2) +#define PVFS_FLAG_MAP_HIDDEN (1<<3) +#define PVFS_FLAG_READONLY (1<<4) +#define PVFS_FLAG_STRICT_SYNC (1<<5) +#define PVFS_FLAG_STRICT_LOCKING (1<<6) #endif /* _VFS_POSIX_H_ */ -- cgit