s3: smbd: Change aio_pending_size static variable to a new "aio max threads" smb...
[samba.git] / source3 / modules / vfs_aio_linux.c
index 599272e386125d0999c5898a14fff960380766db..4f6230a2fdf103693aadd81aecaa2775d73f36c3 100644 (file)
@@ -113,12 +113,12 @@ static bool init_aio_linux(struct vfs_handle_struct *handle)
                goto fail;
        }
 
-       if (io_queue_init(get_aio_pending_size(), &io_ctx)) {
+       if (io_queue_init(lp_aio_max_threads(), &io_ctx)) {
                goto fail;
        }
 
        DEBUG(10,("init_aio_linux: initialized with up to %d events\n",
-                 get_aio_pending_size()));
+                 (int)lp_aio_max_threads()));
 
        return true;
 
@@ -321,25 +321,7 @@ static int aio_linux_int_recv(struct tevent_req *req, int *err)
        return aio_linux_recv(req, err);
 }
 
-static int aio_linux_connect(vfs_handle_struct *handle, const char *service,
-                              const char *user)
-{
-       /*********************************************************************
-        * How many io_events to initialize ?
-        * 128 per process seems insane as a default until you realize that
-        * (a) Throttling is done in SMB2 via the crediting algorithm.
-        * (b) 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.
-        *********************************************************************/
-       set_aio_pending_size(lp_parm_int(
-               SNUM(handle->conn), "aio_linux", "aio num events", 128));
-       return SMB_VFS_NEXT_CONNECT(handle, service, user);
-}
-
 static struct vfs_fn_pointers vfs_aio_linux_fns = {
-       .connect_fn = aio_linux_connect,
        .pread_send_fn = aio_linux_pread_send,
        .pread_recv_fn = aio_linux_recv,
        .pwrite_send_fn = aio_linux_pwrite_send,