smbd: rename sconn->raw_thread_pool to sconn->pool
authorRalph Boehme <slow@samba.org>
Sun, 23 Dec 2018 08:34:20 +0000 (09:34 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 11 Jan 2019 22:11:13 +0000 (23:11 +0100)
This is basically a revert of commit
2be7518ae5a3c046f5fca04ecc83f9f7044eac74.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/modules/vfs_aio_pthread.c
source3/modules/vfs_default.c
source3/smbd/globals.h
source3/smbd/process.c
source3/smbd/smb2_query_directory.c

index da1ca534907f16d8c96a64d43d8235339a0b9433..c1d1a7d518a6bb3f44279d6f9ae531abac1c9096 100644 (file)
@@ -277,7 +277,7 @@ static int open_async(const files_struct *fsp,
 
        subreq = pthreadpool_tevent_job_send(opd,
                                             fsp->conn->user_ev_ctx,
-                                            fsp->conn->sconn->raw_thread_pool,
+                                            fsp->conn->sconn->pool,
                                             aio_open_worker, opd);
        if (subreq == NULL) {
                return -1;
index 0a07d4069d7544177754b5e10d4ea3c34a8b004a..1734361fca9513814191078fa36a1f4e3448a978 100644 (file)
@@ -686,7 +686,7 @@ static struct tevent_req *vfswrap_pread_send(struct vfs_handle_struct *handle,
        SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes);
 
        subreq = pthreadpool_tevent_job_send(
-               state, ev, handle->conn->sconn->raw_thread_pool,
+               state, ev, handle->conn->sconn->pool,
                vfs_pread_do, state);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -804,7 +804,7 @@ static struct tevent_req *vfswrap_pwrite_send(struct vfs_handle_struct *handle,
        SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes);
 
        subreq = pthreadpool_tevent_job_send(
-               state, ev, handle->conn->sconn->raw_thread_pool,
+               state, ev, handle->conn->sconn->pool,
                vfs_pwrite_do, state);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
@@ -914,8 +914,7 @@ static struct tevent_req *vfswrap_fsync_send(struct vfs_handle_struct *handle,
        SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes);
 
        subreq = pthreadpool_tevent_job_send(
-               state, ev, handle->conn->sconn->raw_thread_pool,
-               vfs_fsync_do, state);
+               state, ev, handle->conn->sconn->pool, vfs_fsync_do, state);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }
@@ -3037,7 +3036,7 @@ static struct tevent_req *vfswrap_getxattrat_send(
        subreq = pthreadpool_tevent_job_send(
                        state,
                        ev,
-                       dir_fsp->conn->sconn->raw_thread_pool,
+                       dir_fsp->conn->sconn->pool,
                        vfswrap_getxattrat_do_async,
                        state);
        if (tevent_req_nomem(subreq, req)) {
index b6dc27d47beb57e046f8515ad6d555eaa8c0f03e..5695663cc665e315de5df6d786cf501245821311 100644 (file)
@@ -943,7 +943,7 @@ struct smbd_server_connection {
                } locks;
        } smb2;
 
-       struct pthreadpool_tevent *raw_thread_pool;
+       struct pthreadpool_tevent *pool;
 
        struct smbXsrv_client *client;
 };
index 8e1fceab0aaf6fbc7bcc727e5ffce240cc8ab655..0a4106257f5891cc5e8a573f23ff081dff3f8be0 100644 (file)
@@ -3950,7 +3950,7 @@ void smbd_process(struct tevent_context *ev_ctx,
        sconn->msg_ctx = msg_ctx;
 
        ret = pthreadpool_tevent_init(sconn, lp_aio_max_threads(),
-                                     &sconn->raw_thread_pool);
+                                     &sconn->pool);
        if (ret != 0) {
                exit_server("pthreadpool_tevent_init() failed.");
        }
index 1a3447c3a828ed06bbd941db5a822f5a42f754c4..ab6c3dc788eec8a18920378a603073aacbf8c1de 100644 (file)
@@ -515,7 +515,7 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
        if (state->async_dosmode) {
                size_t max_threads;
 
-               max_threads = pthreadpool_tevent_max_threads(conn->sconn->raw_thread_pool);
+               max_threads = pthreadpool_tevent_max_threads(conn->sconn->pool);
 
                state->max_async_dosmode_active = lp_smbd_max_async_dosmode(
                                                        SNUM(conn));
@@ -660,7 +660,7 @@ static bool smb2_query_directory_next_entry(struct tevent_req *req)
                state->async_dosmode_active++;
 
                outstanding_aio = pthreadpool_tevent_queued_jobs(
-                                       state->fsp->conn->sconn->raw_thread_pool);
+                                       state->fsp->conn->sconn->pool);
 
                if (outstanding_aio > state->max_async_dosmode_active) {
                        stop = true;