diff options
author | Jeremy Allison <jra@samba.org> | 2014-10-14 10:34:53 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-12-04 05:45:10 +0100 |
commit | 44d2612822a39b980fe2b85b2a780de2f3902155 (patch) | |
tree | 0f662bec127e8ab819b81624799354eae5927150 | |
parent | e2d80a89d53fdd6794a344649c3c9728db93adce (diff) | |
download | samba-44d2612822a39b980fe2b85b2a780de2f3902155.tar.gz samba-44d2612822a39b980fe2b85b2a780de2f3902155.tar.xz samba-44d2612822a39b980fe2b85b2a780de2f3902155.zip |
s3:param: Add "smb2 leases" parameter. Default "false".
This is currently marked as experimental!
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | docs-xml/smbdotconf/locking/kerneloplocks.xml | 1 | ||||
-rw-r--r-- | docs-xml/smbdotconf/locking/oplocks.xml | 1 | ||||
-rw-r--r-- | docs-xml/smbdotconf/locking/smb2leases.xml | 28 | ||||
-rw-r--r-- | lib/param/param_table.c | 9 | ||||
-rw-r--r-- | source3/param/loadparm.c | 1 |
5 files changed, 40 insertions, 0 deletions
diff --git a/docs-xml/smbdotconf/locking/kerneloplocks.xml b/docs-xml/smbdotconf/locking/kerneloplocks.xml index 8e3bba5122..d8fe22321e 100644 --- a/docs-xml/smbdotconf/locking/kerneloplocks.xml +++ b/docs-xml/smbdotconf/locking/kerneloplocks.xml @@ -25,5 +25,6 @@ <related>oplocks</related> <related>level2 oplocks</related> +<related>smb2 leases</related> <value type="default">no</value> </samba:parameter> diff --git a/docs-xml/smbdotconf/locking/oplocks.xml b/docs-xml/smbdotconf/locking/oplocks.xml index a56e921410..a5e163ba74 100644 --- a/docs-xml/smbdotconf/locking/oplocks.xml +++ b/docs-xml/smbdotconf/locking/oplocks.xml @@ -25,5 +25,6 @@ <related>kernel oplocks</related> <related>level2 oplocks</related> +<related>smb2 leases</related> <value type="default">yes</value> </samba:parameter> diff --git a/docs-xml/smbdotconf/locking/smb2leases.xml b/docs-xml/smbdotconf/locking/smb2leases.xml new file mode 100644 index 0000000000..0a734ec8e9 --- /dev/null +++ b/docs-xml/smbdotconf/locking/smb2leases.xml @@ -0,0 +1,28 @@ +<samba:parameter name="smb2 leases" + context="G" + type="boolean" + xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> +<description> + <para> + This boolean option tells <command moreinfo="none">smbd</command> whether to + globally negotiate SMB2 leases on file open requests. Leasing is an SMB2-only + feature which allows clients to aggressively cache files locally above and + beyond the caching allowed by SMB1 oplocks. This (experimental) parameter is + set to off by default until the SMB2 leasing code is declared fully stable. + </para> + + <para> + This is only available with <smbconfoption name="oplocks">yes</smbconfoption> + and <smbconfoption name="kernel oplocks">no</smbconfoption>. + </para> + + <para> + The Samba implementation of leases is currently marked as experimental! + </para> +</description> + +<related>oplocks</related> +<related>kernel oplocks</related> +<related>level2 oplocks</related> +<value type="default">no</value> +</samba:parameter> diff --git a/lib/param/param_table.c b/lib/param/param_table.c index 5dbcda8f94..18b0628791 100644 --- a/lib/param/param_table.c +++ b/lib/param/param_table.c @@ -3023,6 +3023,15 @@ struct parm_struct parm_table[] = { .flags = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL, }, { + .label = "smb2 leases", + .type = P_BOOL, + .p_class = P_GLOBAL, + .offset = GLOBAL_VAR(smb2_leases), + .special = NULL, + .enum_list = NULL, + .flags = FLAG_ADVANCED, + }, + { .label = "locking", .type = P_BOOL, .p_class = P_LOCAL, diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 8494c3f54b..da50e3a582 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -855,6 +855,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals) Globals.smb2_max_write = DEFAULT_SMB2_MAX_WRITE; Globals.smb2_max_trans = DEFAULT_SMB2_MAX_TRANSACT; Globals.ismb2_max_credits = DEFAULT_SMB2_MAX_CREDITS; + Globals.smb2_leases = false; string_set(Globals.ctx, &Globals.ncalrpc_dir, get_dyn_NCALRPCDIR()); |