[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Fri Jul 22 12:14:05 UTC 2016
The branch, master has been updated
via c8f2bb1 WHATSNEW. Add text for Open File Description (OFD) locks.
via 95e3d18 WHATSNEW: SMB 2.1 leases enabled by default
via dd10c82 smbd: Enable leases by default
via 5e333b5 s4: torture: Don't crash if connections fail and treeXX variables are left as NULL.
from 6bd0f1c ctdb-pcp-pmda: Reimplement using new client API
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit c8f2bb12ebe480a1a0718dbcaa2b271428657b14
Author: Jeremy Allison <jra at samba.org>
Date: Thu Jul 21 16:24:59 2016 -0700
WHATSNEW. Add text for Open File Description (OFD) locks.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Fri Jul 22 14:13:52 CEST 2016 on sn-devel-144
commit 95e3d185ba88e48fa7b613b54587557dc6452a71
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jul 21 12:21:46 2016 -0700
WHATSNEW: SMB 2.1 leases enabled by default
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit dd10c820aab1c04f079c0d0f41dc176fdd5545c4
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jul 20 12:32:58 2016 +0200
smbd: Enable leases by default
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Böhme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 5e333b5a4e2577f4e90a70a8d73ba67b194056e0
Author: Jeremy Allison <jra at samba.org>
Date: Thu Jul 21 12:49:57 2016 -0700
s4: torture: Don't crash if connections fail and treeXX variables are left as NULL.
Correctly log as torture fail.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 19 +++++++++++++++++++
docs-xml/smbdotconf/locking/smb2leases.xml | 8 ++------
lib/param/loadparm.c | 2 ++
selftest/target/Samba3.pm | 1 -
selftest/target/Samba4.pm | 1 +
source3/param/loadparm.c | 2 +-
source4/torture/smb2/lease.c | 22 +++++++++++++++-------
7 files changed, 40 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 6c86795..7d2405b 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -126,7 +126,25 @@ Samba-tool improvements
Running samba-tool on the command line should now be a lot snappier. The tool
now only loads the code specific to the subcommand that you wish to run.
+SMB 2.1 Leases enabled by default
+---------------------------------
+
+Leasing is an SMB 2.1 (and higher) feature which allows clients to
+aggressively cache files locally above and beyond the caching allowed
+by SMB 1 oplocks. This feature was disabled in previous releases, but
+the SMB2 leasing code is now considered mature and stable enough to be
+enabled by default.
+
+Open File Description (OFD) Locks
+---------------------------------
+On systems that support them (currently only Linux), the fileserver now
+uses Open File Description (OFD) locks instead of POSIX locks to implement
+client byte range locks. As these locks are associated with a specific
+file descriptor on a file this allows more efficient use when multiple
+descriptors having file locks are opened onto the same file. An internal
+tunable "smbd:force process locks = true" may be used to turn off OFD
+locks if there appear to be problems with them.
REMOVED FEATURES
================
@@ -144,6 +162,7 @@ smb.conf changes
only user Removed
username Removed
kccsrv:samba_kcc Changed default true
+ smb2 leases Changed default yes
KNOWN ISSUES
============
diff --git a/docs-xml/smbdotconf/locking/smb2leases.xml b/docs-xml/smbdotconf/locking/smb2leases.xml
index 5ca13d2..6587300 100644
--- a/docs-xml/smbdotconf/locking/smb2leases.xml
+++ b/docs-xml/smbdotconf/locking/smb2leases.xml
@@ -7,8 +7,7 @@
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.
+ beyond the caching allowed by SMB1 oplocks.
</para>
<para>
@@ -18,14 +17,11 @@
<para>Note that the write cache won't be used for file handles with a smb2 write lease.</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>
<related>write cache size</related>
-<value type="default">no</value>
+<value type="default">yes</value>
</samba:parameter>
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index 515ed05..548d105 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2898,6 +2898,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lpcfg_do_global_parameter(lp_ctx, "aio max threads", "100");
+ lpcfg_do_global_parameter(lp_ctx, "smb2 leases", "yes");
+
/* Allow modules to adjust defaults */
for (defaults_hook = defaults_hooks; defaults_hook;
defaults_hook = defaults_hook->next) {
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index f5f4c0c..b5ea469 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1411,7 +1411,6 @@ sub provision($$$$$$$$)
kernel oplocks = no
kernel change notify = no
- smb2 leases = yes
logging = file
printing = bsd
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index b09bb66..9d96c16 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -1652,6 +1652,7 @@ sub provision_ad_dc($$)
kernel oplocks = no
kernel change notify = no
+ smb2 leases = no
logging = file
printing = bsd
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index df700bc..71e9e2e 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -862,7 +862,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.smb2_max_credits = DEFAULT_SMB2_MAX_CREDITS;
- Globals.smb2_leases = false;
+ Globals.smb2_leases = true;
lpcfg_string_set(Globals.ctx, &Globals.ncalrpc_dir,
get_dyn_NCALRPCDIR());
diff --git a/source4/torture/smb2/lease.c b/source4/torture/smb2/lease.c
index 4b435a1..6a2e88b 100644
--- a/source4/torture/smb2/lease.c
+++ b/source4/torture/smb2/lease.c
@@ -3744,7 +3744,9 @@ static bool test_lease_dynamic_share(struct torture_context *tctx,
options2_1.max_protocol = PROTOCOL_SMB2_10;
/* create a new connection (same client_guid) */
if (!torture_smb2_connection_ext(tctx, 0, &options2_1, &tree_2_1)) {
- torture_warning(tctx, "couldn't reconnect max protocol 2.1, bailing\n");
+ torture_result(tctx, TORTURE_FAIL,
+ __location__ "couldn't reconnect "
+ "max protocol 2.1, bailing\n");
ret = false;
goto done;
}
@@ -3760,7 +3762,9 @@ static bool test_lease_dynamic_share(struct torture_context *tctx,
options3_0.max_protocol = PROTOCOL_SMB3_00;
/* create a new connection (same client_guid) */
if (!torture_smb2_connection_ext(tctx, 0, &options3_0, &tree_3_0)) {
- torture_warning(tctx, "couldn't reconnect max protocol 3.0, bailing\n");
+ torture_result(tctx, TORTURE_FAIL,
+ __location__ "couldn't reconnect "
+ "max protocol 3.0, bailing\n");
ret = false;
goto done;
}
@@ -3867,12 +3871,16 @@ static bool test_lease_dynamic_share(struct torture_context *tctx,
done:
- smb2_util_close(tree_2_1, h);
- smb2_util_close(tree_3_0, h1);
- smb2_util_close(tree_3_0, h2);
+ if (tree_2_1 != NULL) {
+ smb2_util_close(tree_2_1, h);
+ smb2_util_unlink(tree_2_1, fname);
+ }
+ if (tree_3_0 != NULL) {
+ smb2_util_close(tree_3_0, h1);
+ smb2_util_close(tree_3_0, h2);
- smb2_util_unlink(tree_2_1, fname);
- smb2_util_unlink(tree_3_0, fname);
+ smb2_util_unlink(tree_3_0, fname);
+ }
/* Set sharename back. */
lpcfg_set_cmdline(tctx->lp_ctx, "torture:share", orig_share);
--
Samba Shared Repository
More information about the samba-cvs
mailing list