From: Volker Lendecke Date: Mon, 4 Dec 2017 14:39:10 +0000 (+0100) Subject: smbd: Enable async I/O by default X-Git-Tag: talloc-2.1.11~245 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=35eb4962a01c02919226714f7cdd959c923f4045;p=thirdparty%2Fsamba.git smbd: Enable async I/O by default 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 Reviewed-by: Andreas Schneider --- diff --git a/docs-xml/smbdotconf/tuning/aioreadsize.xml b/docs-xml/smbdotconf/tuning/aioreadsize.xml index c6028b8f9ac..4785d2abad9 100644 --- a/docs-xml/smbdotconf/tuning/aioreadsize.xml +++ b/docs-xml/smbdotconf/tuning/aioreadsize.xml @@ -13,7 +13,7 @@ aio write size -0 -1Always do reads asynchronously +1 +0Always do reads synchronously diff --git a/docs-xml/smbdotconf/tuning/aiowritesize.xml b/docs-xml/smbdotconf/tuning/aiowritesize.xml index 8f42284111e..1d649fe7c2c 100644 --- a/docs-xml/smbdotconf/tuning/aiowritesize.xml +++ b/docs-xml/smbdotconf/tuning/aiowritesize.xml @@ -18,7 +18,7 @@ aio read size -0 -1Always do writes asynchronously +1 +0Always do writes synchronously diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 73b7901d7f6..508fa5a692d 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -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")); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 01c022e2889..a34b3dbd1ad 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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,