summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/vfs_posix.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-26 13:07:55 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-26 13:07:55 +0100
commita999a1fc996234555bd2d8a4a873b39d111c347e (patch)
tree737b0bf68f6a93d6e835676b96b8bb3c606d1c91 /source4/ntvfs/posix/vfs_posix.h
parent227df641f680d844c85ea0ed1694e41ed355e262 (diff)
parent901addd4a18a9a166fc3518a7bce70969f884e6f (diff)
downloadsamba-a999a1fc996234555bd2d8a4a873b39d111c347e.tar.gz
samba-a999a1fc996234555bd2d8a4a873b39d111c347e.tar.bz2
samba-a999a1fc996234555bd2d8a4a873b39d111c347e.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
(This used to be commit 4dab354b626a02e9a5f5cac0d374d18e22718e18)
Diffstat (limited to 'source4/ntvfs/posix/vfs_posix.h')
-rw-r--r--source4/ntvfs/posix/vfs_posix.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h
index 84c456dcfe..4d22a91714 100644
--- a/source4/ntvfs/posix/vfs_posix.h
+++ b/source4/ntvfs/posix/vfs_posix.h
@@ -29,6 +29,7 @@
#include "dsdb/samdb/samdb.h"
struct pvfs_wait;
+struct pvfs_oplock;
/* this is the private structure for the posix vfs backend. It is used
to hold per-connection (per tree connect) state information */
@@ -51,9 +52,12 @@ struct pvfs_state {
ntcancel */
struct pvfs_wait *wait_list;
- /* the sharing violation timeout */
+ /* the sharing violation timeout (nsecs) */
uint_t sharing_violation_delay;
+ /* the oplock break timeout (secs) */
+ uint_t oplock_break_timeout;
+
/* filesystem attributes (see FS_ATTR_*) */
uint32_t fs_attribs;
@@ -154,6 +158,13 @@ struct pvfs_file_handle {
bool have_opendb_entry;
+ /*
+ * we need to wait for oplock break requests from other processes,
+ * and we need to remember the pvfs_file so we can correctly
+ * forward the oplock break to the client
+ */
+ struct pvfs_oplock *oplock;
+
/* we need this hook back to our parent for lock destruction */
struct pvfs_state *pvfs;
@@ -230,10 +241,16 @@ struct pvfs_dir;
/* types of notification for pvfs wait events */
enum pvfs_wait_notice {PVFS_WAIT_EVENT, PVFS_WAIT_TIMEOUT, PVFS_WAIT_CANCEL};
+/*
+ state of a pending retry
+*/
+struct pvfs_odb_retry;
+
#define PVFS_EADB "posix:eadb"
#define PVFS_XATTR "posix:xattr"
#define PVFS_FAKE_OPLOCKS "posix:fakeoplocks"
#define PVFS_SHARE_DELAY "posix:sharedelay"
+#define PVFS_OPLOCK_TIMEOUT "posix:oplocktimeout"
#define PVFS_ALLOCATION_ROUNDING "posix:allocationrounding"
#define PVFS_SEARCH_INACTIVITY "posix:searchinactivity"
#define PVFS_ACL "posix:acl"
@@ -241,7 +258,8 @@ enum pvfs_wait_notice {PVFS_WAIT_EVENT, PVFS_WAIT_TIMEOUT, PVFS_WAIT_CANCEL};
#define PVFS_XATTR_DEFAULT true
#define PVFS_FAKE_OPLOCKS_DEFAULT false
-#define PVFS_SHARE_DELAY_DEFAULT 1000000
+#define PVFS_SHARE_DELAY_DEFAULT 1000000 /* nsecs */
+#define PVFS_OPLOCK_TIMEOUT_DEFAULT 30 /* secs */
#define PVFS_ALLOCATION_ROUNDING_DEFAULT 512
#define PVFS_SEARCH_INACTIVITY_DEFAULT 300