summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-25 19:17:45 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-26 09:32:59 +0100
commitc0d1543a6a5fee3d767a366186dd634a395c8146 (patch)
tree48ffc9e48bb1716b0b02e165c9c6e5e7ce320ce1 /source4
parentee81b7a85e8bb749a00c85bfdcf8f1e341ad2eea (diff)
downloadsamba-c0d1543a6a5fee3d767a366186dd634a395c8146.tar.gz
samba-c0d1543a6a5fee3d767a366186dd634a395c8146.tar.bz2
samba-c0d1543a6a5fee3d767a366186dd634a395c8146.zip
pvfs: add posix:oplocktimeout=30 option
metze (This used to be commit 5abc57ddab558c13db3864d13afc2ad3b1641d1c)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/vfs_posix.c4
-rw-r--r--source4/ntvfs/posix/vfs_posix.h9
2 files changed, 11 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index e058e6f546..ca874d1db1 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -91,6 +91,10 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
PVFS_SHARE_DELAY,
PVFS_SHARE_DELAY_DEFAULT);
+ pvfs->oplock_break_timeout = share_int_option(scfg,
+ PVFS_OPLOCK_TIMEOUT,
+ PVFS_OPLOCK_TIMEOUT_DEFAULT);
+
pvfs->share_name = talloc_strdup(pvfs, scfg->name);
pvfs->fs_attribs =
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h
index 72469505cc..4d22a91714 100644
--- a/source4/ntvfs/posix/vfs_posix.h
+++ b/source4/ntvfs/posix/vfs_posix.h
@@ -52,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;
@@ -247,6 +250,7 @@ struct pvfs_odb_retry;
#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"
@@ -254,7 +258,8 @@ struct pvfs_odb_retry;
#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