From d7ea52e9a3cd920f7c8a3b00f7cd28a7f605a993 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 21 Feb 2008 17:48:13 +0100 Subject: pvfs_open: make the retry logic indepdendent from open and sharing violations metze (This used to be commit 56bd63a4236ebf360d3e805c8560df86759573f7) --- source4/ntvfs/posix/vfs_posix.h | 5 +++++ 1 file changed, 5 insertions(+) (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 84c456dcfe..50875c3f9b 100644 --- a/source4/ntvfs/posix/vfs_posix.h +++ b/source4/ntvfs/posix/vfs_posix.h @@ -230,6 +230,11 @@ 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" -- cgit From be1ba5b63164e7dab4bf067bc1aac4ed9cece2bc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 25 Feb 2008 08:39:13 +0100 Subject: pvfs_open: call pvfs_setup_oplock() if an oplock was granted This is needed to receive oplock breaks from other "processes" metze (This used to be commit dd56f55afdc0d114a0b0bceb0e4feb022919323a) --- source4/ntvfs/posix/vfs_posix.h | 8 ++++++++ 1 file changed, 8 insertions(+) (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 50875c3f9b..72469505cc 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 */ @@ -154,6 +155,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; -- cgit From c0d1543a6a5fee3d767a366186dd634a395c8146 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 25 Feb 2008 19:17:45 +0100 Subject: pvfs: add posix:oplocktimeout=30 option metze (This used to be commit 5abc57ddab558c13db3864d13afc2ad3b1641d1c) --- source4/ntvfs/posix/vfs_posix.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 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 -- cgit