[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Thu Dec 6 04:15:13 UTC 2018
The branch, master has been updated
via 9aad13cbad0 WHATSNEW: document changes in SMB server parametric options
via a6606d87739 smbd: use lp_smbd_getinfo_ask_sharemode()
via 38d819e8992 docs-xml: add "smbd getinfo ask sharemode"
via 941d7e159a8 s3:smbd: use lp_smbd_max_async_dosmode()
via 14132e89b4b docs-xml: add "smbd max async dosmode"
via 54b7132d106 s3:smbd: use lp_smbd_async_dosmode()
via 040a2c17296 docs-xml: add "smbd async dosmode"
via ea41bf46d8a s3:smbd: use lp_smbd_search_ask_sharemode()
via ea36967c04d docs-xml: add "smbd search ask sharemode"
via 69521c17bb6 tests:docs: add a exceptions set
via 1327e2f40f4 tests:docs: reindent special_cases to one by line
from 5674c21c115 Added redirect from GitHub to GitLab
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9aad13cbad06e753a79610996cbe64823f5eda35
Author: Ralph Boehme <slow at samba.org>
Date: Mon Dec 3 11:23:28 2018 +0100
WHATSNEW: document changes in SMB server parametric options
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Thu Dec 6 05:14:03 CET 2018 on sn-devel-144
commit a6606d87739b29962d09c7954c07cb4c25811afd
Author: Ralph Boehme <slow at samba.org>
Date: Mon Dec 3 11:30:51 2018 +0100
smbd: use lp_smbd_getinfo_ask_sharemode()
Counterpart for "smbd:search ask sharemode" for getinfo.
Pair-Programmed-With: Volker Lendecke <vl at samba.org>
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 38d819e89924e2a93d7e3fca14471497d5d24d25
Author: Ralph Boehme <slow at samba.org>
Date: Sun Dec 2 10:07:59 2018 +0100
docs-xml: add "smbd getinfo ask sharemode"
Counterpart for "smbd search ask sharemode" for getinfo.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 941d7e159a8098b12294ca561fd8e4b8f235c18f
Author: Ralph Boehme <slow at samba.org>
Date: Sun Dec 2 09:23:29 2018 +0100
s3:smbd: use lp_smbd_max_async_dosmode()
Parametric options have a performance impact, use the normal options
added in the previous commit.
"aio max threads" can only be calculated at run time and requires a
handle to a pthreadpool_tevent which loadparm will never have.
Because of that lp_smbd_max_async_dosmode() will always return 0 as
default and it's up to us to calculate "aio max threads * 2" if
lp_smbd_max_async_dosmode() returns 0.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 14132e89b4b9ac6712fe6f49945da3f4d987cc14
Author: Ralph Boehme <slow at samba.org>
Date: Sun Dec 2 09:22:56 2018 +0100
docs-xml: add "smbd max async dosmode"
The parameter is added to the lists of ignored-paremteres in the
samba.docs tests, as the given default "aio max threads * 2" works only
as manpage string.
"aio max threads" can only be calculated at run time and requires a
handle to a pthreadpool_tevent which loadparm will never have.
Because of that lp_smbd_max_async_dosmode() will always return 0 as
default and it's up to the caller to calculate "aio max threads * 2" if
lp_smbd_max_async_dosmode() returns 0. Cf the next commit.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 54b7132d10605102f69b3dbb4c79c7aa9e4fdd62
Author: Ralph Boehme <slow at samba.org>
Date: Sun Dec 2 09:21:46 2018 +0100
s3:smbd: use lp_smbd_async_dosmode()
Parametric options have a performance impact, use the normal options
added in the previous commit.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 040a2c1729609837a4946f009d7b5a88515a9ba7
Author: Ralph Boehme <slow at samba.org>
Date: Sun Dec 2 09:21:26 2018 +0100
docs-xml: add "smbd async dosmode"
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit ea41bf46d8ad43dacd71422acfe184d5262a497a
Author: Ralph Boehme <slow at samba.org>
Date: Sat Dec 1 00:10:41 2018 +0100
s3:smbd: use lp_smbd_search_ask_sharemode()
Parametric options have a performance impact, use the normal options
added in the previous commit.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit ea36967c04daba6fdc349222240a0847b6ca2385
Author: Ralph Boehme <slow at samba.org>
Date: Fri Nov 30 20:24:10 2018 +0100
docs-xml: add "smbd search ask sharemode"
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 69521c17bb62c6c35498083470bf00277a3cec89
Author: Ralph Boehme <slow at samba.org>
Date: Mon Dec 3 15:44:22 2018 +0100
tests:docs: add a exceptions set
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1327e2f40f4b7b05f8e636922c2b1cf17edc2903
Author: Ralph Boehme <slow at samba.org>
Date: Mon Dec 3 14:59:55 2018 +0100
tests:docs: reindent special_cases to one by line
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 9 ++++-
.../smbdasyncdosmode.xml} | 9 ++---
.../smbdotconf/misc/smbdgetinfoasksharemode.xml | 14 +++++++
docs-xml/smbdotconf/misc/smbdmaxasyncdosmode.xml | 12 ++++++
.../smbdotconf/misc/smbdsearchasksharemode.xml | 13 +++++++
lib/param/loadparm.c | 2 +
python/samba/tests/docs.py | 44 +++++++++++++++++-----
source3/param/loadparm.c | 2 +
source3/smbd/smb2_getinfo.c | 22 +++++++----
source3/smbd/smb2_query_directory.c | 14 +++----
source3/smbd/trans2.c | 26 ++++++++++---
11 files changed, 128 insertions(+), 39 deletions(-)
copy docs-xml/smbdotconf/{filename/hidespecialfiles.xml => misc/smbdasyncdosmode.xml} (50%)
create mode 100644 docs-xml/smbdotconf/misc/smbdgetinfoasksharemode.xml
create mode 100644 docs-xml/smbdotconf/misc/smbdmaxasyncdosmode.xml
create mode 100644 docs-xml/smbdotconf/misc/smbdsearchasksharemode.xml
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 50543637c86..0d7aed0c27e 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -113,7 +113,14 @@ smb.conf changes
between attempts.
prefork maximum backoff Maximum delay for process between 120 (seconds)
process restart attempts
-
+ smbd search ask sharemode Name changed, old name was
+ "smbd:search ask sharemode"
+ smbd async dosmode Name changed, old name was
+ "smbd:async dosmode"
+ smbd max async dosmode Name changed, old name was
+ "smbd:max async dosmode"
+ smbd getinfo ask sharemode New: similar to "smbd search ask yes
+ sharemode" but for SMB getinfo
KNOWN ISSUES
============
diff --git a/docs-xml/smbdotconf/filename/hidespecialfiles.xml b/docs-xml/smbdotconf/misc/smbdasyncdosmode.xml
similarity index 50%
copy from docs-xml/smbdotconf/filename/hidespecialfiles.xml
copy to docs-xml/smbdotconf/misc/smbdasyncdosmode.xml
index 904fd3a6e7d..03d902c376a 100644
--- a/docs-xml/smbdotconf/filename/hidespecialfiles.xml
+++ b/docs-xml/smbdotconf/misc/smbdasyncdosmode.xml
@@ -1,14 +1,13 @@
-<samba:parameter name="hide special files"
+<samba:parameter name="smbd async dosmode"
context="S"
type="boolean"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
-
<para>
- This parameter prevents clients from seeing special files such as sockets, devices and
- fifo's in directory listings.
+ This parameter control whether the fileserver will use sync or async
+ methods for fetching the DOS attributes when doing a directory listing. By default sync methods will be
+ used.
</para>
-
</description>
<value type="default">no</value>
</samba:parameter>
diff --git a/docs-xml/smbdotconf/misc/smbdgetinfoasksharemode.xml b/docs-xml/smbdotconf/misc/smbdgetinfoasksharemode.xml
new file mode 100644
index 00000000000..1bef948ad2b
--- /dev/null
+++ b/docs-xml/smbdotconf/misc/smbdgetinfoasksharemode.xml
@@ -0,0 +1,14 @@
+<samba:parameter name="smbd getinfo ask sharemode"
+ context="S"
+ type="boolean"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This parameter allows disabling fetching file write time from the open
+ file handle database locking.tdb when a client requests file or
+ directory metadata. It's a performance optimisation at the expense of
+ protocol correctness.
+ </para>
+</description>
+<value type="default">yes</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/misc/smbdmaxasyncdosmode.xml b/docs-xml/smbdotconf/misc/smbdmaxasyncdosmode.xml
new file mode 100644
index 00000000000..b375298be31
--- /dev/null
+++ b/docs-xml/smbdotconf/misc/smbdmaxasyncdosmode.xml
@@ -0,0 +1,12 @@
+<samba:parameter name="smbd max async dosmode"
+ context="S"
+ type="integer"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This parameter controls how many async operations to fetch the DOS
+ attributes the fileserver will queue when doing directory listings.
+ </para>
+</description>
+<value type="default">aio max threads * 2</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/misc/smbdsearchasksharemode.xml b/docs-xml/smbdotconf/misc/smbdsearchasksharemode.xml
new file mode 100644
index 00000000000..de78818c5f8
--- /dev/null
+++ b/docs-xml/smbdotconf/misc/smbdsearchasksharemode.xml
@@ -0,0 +1,13 @@
+<samba:parameter name="smbd search ask sharemode"
+ context="S"
+ type="boolean"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This parameter allows disabling fetching file write time from the open
+ file handle database locking.tdb. It's a performance optimisation at
+ the expense of protocol correctness.
+ </para>
+</description>
+<value type="default">yes</value>
+</samba:parameter>
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index a7dbc6f8f0b..f31ef2319ac 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2592,6 +2592,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lp_ctx->sDefault->force_directory_mode = 0000;
lp_ctx->sDefault->aio_read_size = 1;
lp_ctx->sDefault->aio_write_size = 1;
+ lp_ctx->sDefault->smbd_search_ask_sharemode = true;
+ lp_ctx->sDefault->smbd_getinfo_ask_sharemode = true;
DEBUG(3, ("Initialising global parameters\n"));
diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index e11ebd1d26a..b6c15b7d8de 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -100,15 +100,33 @@ def get_documented_tuples(sourcedir, omit_no_default=True):
class SmbDotConfTests(TestCase):
# defines the cases where the defaults may differ from the documentation
- special_cases = set(['log level', 'path',
- 'panic action', 'homedir map', 'NIS homedir',
- 'server string', 'netbios name', 'socket options', 'use mmap',
- 'ctdbd socket', 'printing', 'printcap name', 'queueresume command',
- 'queuepause command', 'lpresume command', 'lppause command',
- 'lprm command', 'lpq command', 'print command', 'template homedir',
- 'max open files',
- 'include system krb5 conf', 'rpc server dynamic port range',
- 'mit kdc command'])
+ special_cases = set([
+ 'log level',
+ 'path',
+ 'panic action',
+ 'homedir map',
+ 'NIS homedir',
+ 'server string',
+ 'netbios name',
+ 'socket options',
+ 'use mmap',
+ 'ctdbd socket',
+ 'printing',
+ 'printcap name',
+ 'queueresume command',
+ 'queuepause command',
+ 'lpresume command',
+ 'lppause command',
+ 'lprm command',
+ 'lpq command',
+ 'print command',
+ 'template homedir',
+ 'max open files',
+ 'include system krb5 conf',
+ 'rpc server dynamic port range',
+ 'mit kdc command',
+ 'smbd max async dosmode',
+ ])
def setUp(self):
super(SmbDotConfTests, self).setUp()
@@ -227,7 +245,13 @@ class SmbDotConfTests(TestCase):
for tuples in self.defaults:
param, default, context, param_type = tuples
- if param in ['printing', 'rpc server dynamic port range']:
+ exceptions = set([
+ 'printing',
+ 'rpc server dynamic port range',
+ 'smbd max async dosmode',
+ ])
+
+ if param in exceptions:
continue
section = None
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index d8be520dc51..29d9d59390b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -246,6 +246,8 @@ static const struct loadparm_service _sDefault =
.durable_handles = true,
.check_parent_directory_delete_on_close = false,
.param_opt = NULL,
+ .smbd_search_ask_sharemode = true,
+ .smbd_getinfo_ask_sharemode = true,
.dummy = ""
};
diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c
index 7bded422520..314f44e858c 100644
--- a/source3/smbd/smb2_getinfo.c
+++ b/source3/smbd/smb2_getinfo.c
@@ -353,10 +353,13 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
- fileid = vfs_file_id_from_sbuf(conn,
- &fsp->fsp_name->st);
- get_file_infos(fileid, fsp->name_hash,
- &delete_pending, &write_time_ts);
+ if (lp_smbd_getinfo_ask_sharemode(SNUM(conn))) {
+ fileid = vfs_file_id_from_sbuf(
+ conn, &fsp->fsp_name->st);
+ get_file_infos(fileid, fsp->name_hash,
+ &delete_pending,
+ &write_time_ts);
+ }
} else {
/*
* Original code - this is an open file.
@@ -370,10 +373,13 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx,
tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
}
- fileid = vfs_file_id_from_sbuf(conn,
- &fsp->fsp_name->st);
- get_file_infos(fileid, fsp->name_hash,
- &delete_pending, &write_time_ts);
+ if (lp_smbd_getinfo_ask_sharemode(SNUM(conn))) {
+ fileid = vfs_file_id_from_sbuf(
+ conn, &fsp->fsp_name->st);
+ get_file_infos(fileid, fsp->name_hash,
+ &delete_pending,
+ &write_time_ts);
+ }
}
status = smbd_do_qfilepathinfo(conn, state,
diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c
index fb77edca2bf..68c00241a51 100644
--- a/source3/smbd/smb2_query_directory.c
+++ b/source3/smbd/smb2_query_directory.c
@@ -506,11 +506,9 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
* handling in future.
*/
if (state->info_level != SMB_FIND_FILE_NAMES_INFO) {
- state->ask_sharemode = lp_parm_bool(
- SNUM(conn), "smbd", "search ask sharemode", true);
+ state->ask_sharemode = lp_smbd_search_ask_sharemode(SNUM(conn));
- state->async_dosmode = lp_parm_bool(
- SNUM(conn), "smbd", "async dosmode", false);
+ state->async_dosmode = lp_smbd_async_dosmode(SNUM(conn));
}
if (state->ask_sharemode && lp_clustering()) {
@@ -523,12 +521,10 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
max_threads = pthreadpool_tevent_max_threads(state->tp_chdir_safe);
- state->max_async_dosmode_active = lp_parm_ulong(
- SNUM(conn), "smbd", "max async dosmode",
- max_threads * 2);
-
+ state->max_async_dosmode_active = lp_smbd_max_async_dosmode(
+ SNUM(conn));
if (state->max_async_dosmode_active == 0) {
- state->max_async_dosmode_active = 1;
+ state->max_async_dosmode_active = max_threads * 2;
}
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 306174e597d..d3497fed0b4 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5785,8 +5785,13 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
- fileid = vfs_file_id_from_sbuf(conn, &smb_fname->st);
- get_file_infos(fileid, fsp->name_hash, &delete_pending, &write_time_ts);
+ if (lp_smbd_getinfo_ask_sharemode(SNUM(conn))) {
+ fileid = vfs_file_id_from_sbuf(
+ conn, &smb_fname->st);
+ get_file_infos(fileid, fsp->name_hash,
+ &delete_pending,
+ &write_time_ts);
+ }
} else {
/*
* Original code - this is an open file.
@@ -5798,8 +5803,13 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
map_nt_error_from_unix(errno));
return;
}
- fileid = vfs_file_id_from_sbuf(conn, &smb_fname->st);
- get_file_infos(fileid, fsp->name_hash, &delete_pending, &write_time_ts);
+ if (lp_smbd_getinfo_ask_sharemode(SNUM(conn))) {
+ fileid = vfs_file_id_from_sbuf(
+ conn, &smb_fname->st);
+ get_file_infos(fileid, fsp->name_hash,
+ &delete_pending,
+ &write_time_ts);
+ }
}
} else {
@@ -5967,8 +5977,12 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
- fileid = vfs_file_id_from_sbuf(conn, &smb_fname->st);
- get_file_infos(fileid, name_hash, &delete_pending, &write_time_ts);
+ if (lp_smbd_getinfo_ask_sharemode(SNUM(conn))) {
+ fileid = vfs_file_id_from_sbuf(conn, &smb_fname->st);
+ get_file_infos(fileid, name_hash, &delete_pending,
+ &write_time_ts);
+ }
+
if (delete_pending) {
reply_nterror(req, NT_STATUS_DELETE_PENDING);
return;
--
Samba Shared Repository
More information about the samba-cvs
mailing list