summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-04-08 21:49:59 +0200
committerVolker Lendecke <vl@samba.org>2012-04-09 18:05:01 +0200
commit5856ab89fa2f5736af641bc05102ad47390e84b7 (patch)
tree7e0a6b82313be48a2be089b29c89f7a30ffb5767
parent5f3ac4d6c4754c98e54eed4b09ccd267bb570fa7 (diff)
downloadsamba-5856ab89fa2f5736af641bc05102ad47390e84b7.tar.gz
samba-5856ab89fa2f5736af641bc05102ad47390e84b7.tar.bz2
samba-5856ab89fa2f5736af641bc05102ad47390e84b7.zip
s3: Initialize aio_pending_size from aio_pthread
-rw-r--r--source3/modules/vfs_aio_fork.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c
index 0d928cb522..d10cc9f40b 100644
--- a/source3/modules/vfs_aio_fork.c
+++ b/source3/modules/vfs_aio_fork.c
@@ -23,6 +23,7 @@
#include "system/filesys.h"
#include "system/shmem.h"
#include "smbd/smbd.h"
+#include "smbd/globals.h"
#ifndef MAP_FILE
#define MAP_FILE 0
@@ -879,7 +880,25 @@ static int aio_fork_suspend(struct vfs_handle_struct *handle,
return ret;
}
+static int aio_fork_connect(vfs_handle_struct *handle, const char *service,
+ const char *user)
+{
+ /*********************************************************************
+ * How many threads to initialize ?
+ * 100 per process seems insane as a default until you realize that
+ * (a) Threads terminate after 1 second when idle.
+ * (b) Throttling is done in SMB2 via the crediting algorithm.
+ * (c) SMB1 clients are limited to max_mux (50) outstanding
+ * requests and Windows clients don't use this anyway.
+ * Essentially we want this to be unlimited unless smb.conf
+ * says different.
+ *********************************************************************/
+ aio_pending_size = 100;
+ return SMB_VFS_NEXT_CONNECT(handle, service, user);
+}
+
static struct vfs_fn_pointers vfs_aio_fork_fns = {
+ .connect_fn = aio_fork_connect,
.aio_read_fn = aio_fork_read,
.aio_write_fn = aio_fork_write,
.aio_return_fn = aio_fork_return_fn,