smbd: Enable async I/O by default
authorVolker Lendecke <vl@samba.org>
Mon, 4 Dec 2017 14:39:10 +0000 (15:39 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 12 Dec 2017 19:37:08 +0000 (20:37 +0100)
We've had this code in for long enough that we should enable it by default.
Modern clients do overlapping I/O, we should utilize that if possible.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
docs-xml/smbdotconf/tuning/aioreadsize.xml
docs-xml/smbdotconf/tuning/aiowritesize.xml
lib/param/loadparm.c
source3/param/loadparm.c

index c6028b8f9ac3ca7a58241d57995c118a2fa3c633..4785d2abad9b7cdfbcfd065d82c7157205d8ad7d 100644 (file)
@@ -13,7 +13,7 @@
   <related>aio write size</related>
 </description>
 
-<value type="default">0</value>
-<value type="example">1<comment>Always do reads asynchronously
+<value type="default">1</value>
+<value type="example">0<comment>Always do reads synchronously
   </comment></value>
 </samba:parameter>
index 8f42284111e42ea60e664230adb5683fb35f3502..1d649fe7c2ccdcdfb77c4c9aec75f4e2f6bdb6bd 100644 (file)
@@ -18,7 +18,7 @@
   <related>aio read size</related>
 </description>
 
-<value type="default">0</value>
-<value type="example">1<comment>Always do writes asynchronously
+<value type="default">1</value>
+<value type="example">0<comment>Always do writes synchronously
     </comment></value>
 </samba:parameter>
index 73b7901d7f603c485c957a8a3b61bfedc26e66b2..508fa5a692dafc094ad8792a58a4f1e65e098217 100644 (file)
@@ -2590,6 +2590,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
        lp_ctx->sDefault->force_create_mode = 0000;
        lp_ctx->sDefault->directory_mask = 0755;
        lp_ctx->sDefault->force_directory_mode = 0000;
+       lp_ctx->sDefault->aio_read_size = 1;
+       lp_ctx->sDefault->aio_write_size = 1;
 
        DEBUG(3, ("Initialising global parameters\n"));
 
index 01c022e28891cf0d2c68770ae9901befa53773ba..a34b3dbd1ad81d1715d80a3a313a5c323ec8d4c9 100644 (file)
@@ -238,8 +238,8 @@ static const struct loadparm_service _sDefault =
        .acl_group_control = false,
        .acl_allow_execute_always = false,
        .allocation_roundup_size = SMB_ROUNDUP_ALLOCATION_SIZE,
-       .aio_read_size = 0,
-       .aio_write_size = 0,
+       .aio_read_size = 1,
+       .aio_write_size = 1,
        .map_readonly = MAP_READONLY_YES,
        .directory_name_cache_size = 100,
        .smb_encrypt = SMB_SIGNING_DEFAULT,