param: change default of "allocation roundup size" to 0
authorBjörn Jacke <bj@sernet.de>
Wed, 19 Jun 2019 11:04:55 +0000 (13:04 +0200)
committerBjoern Jacke <bjacke@samba.org>
Sun, 7 Jul 2019 21:32:25 +0000 (21:32 +0000)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
docs-xml/smbdotconf/tuning/allocationroundupsize.xml
lib/param/loadparm.c
source3/include/local.h
source3/param/loadparm.c

index eaea467bc390ee5c48cf1d592b0c118dc4fb92c2..aabbba32655aebc45d52b7f3f902a985e97b1d12 100644 (file)
@@ -4,17 +4,21 @@
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
     <para>This parameter allows an administrator to tune the 
-    allocation size reported to Windows clients.  The default 
-    size of 1Mb generally results in improved Windows client
-    performance.   However, rounding the allocation size may cause
+    allocation size reported to Windows clients. This is only
+    useful for old SMB1 clients because modern SMB dialects
+    eliminated that bottleneck and have better performance by
+    default.  Using this parameter may cause
     difficulties for some applications, e.g. MS Visual Studio.
     If the MS Visual Studio compiler starts to crash with an
     internal error, set this parameter to zero for this share.
+    Settings this parameter to a large value can also cause
+    small files to allocate more space on the disk than
+    needed.
     </para>
 
     <para>The integer parameter specifies the roundup size in bytes.</para>
 </description>
 
-<value type="default">1048576</value>
-<value type="example">0<comment>(to disable roundups)</comment></value>
+<value type="default">0</value>
+<value type="example">1048576<comment>(to set it to the former default of 1 MiB)</comment></value>
 </samba:parameter>
index 413e023780019da9c3944aea4f0bdfcf521afd68..239d671803f2be1a495c81518e5adebf31d5f405 100644 (file)
@@ -2889,8 +2889,6 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
 
        lpcfg_do_global_parameter(lp_ctx, "show add printer wizard", "yes");
 
-       lpcfg_do_global_parameter(lp_ctx, "allocation roundup size", "1048576");
-
        lpcfg_do_global_parameter(lp_ctx, "ldap page size", "1000");
 
        lpcfg_do_global_parameter(lp_ctx, "kernel share modes", "yes");
index 62700aace3c26096648c71f8a851e523b96de8bd..9ae1bcf5347728eb0c14e698149bfbe52a9e63ac 100644 (file)
 /* the maximum age in seconds of a password. Should be a lp_ parameter */
 #define MAX_PASSWORD_AGE (21*24*60*60)
 
-/* Default allocation roundup. */
-#define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000
-
 /* shall we deny oplocks to clients that get timeouts? */
 #define FASCIST_OPLOCK_BACKOFF 1
 
index 5104a3408f168b5332b6f3b0b6f9603bef0e1de5..c2e1f341c575ab94d54f1c33dfbd40db591ebc5e 100644 (file)
@@ -236,7 +236,6 @@ static const struct loadparm_service _sDefault =
        .acl_map_full_control = true,
        .acl_group_control = false,
        .acl_allow_execute_always = false,
-       .allocation_roundup_size = SMB_ROUNDUP_ALLOCATION_SIZE,
        .aio_read_size = 1,
        .aio_write_size = 1,
        .map_readonly = MAP_READONLY_NO,