Skip to content

Commit

Permalink
smbd: Enable async I/O by default
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
  • Loading branch information
vlendec authored and jrasamba committed Dec 12, 2017
1 parent 18c2c59 commit 35eb496
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs-xml/smbdotconf/tuning/aioreadsize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
4 changes: 2 additions & 2 deletions docs-xml/smbdotconf/tuning/aiowritesize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 2 additions & 0 deletions lib/param/loadparm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Expand Down
4 changes: 2 additions & 2 deletions source3/param/loadparm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 35eb496

Please sign in to comment.