From 2be7518ae5a3c046f5fca04ecc83f9f7044eac74 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 13 Jul 2018 17:17:50 +0200 Subject: [PATCH] smbd: rename sconn->pool to sconn->raw_thread_pool This should in future not be used directly, we'll provide wrapper pools, which will provide impersonation for path based async calls. Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- source3/modules/vfs_aio_pthread.c | 2 +- source3/modules/vfs_default.c | 7 ++++--- source3/smbd/globals.h | 2 +- source3/smbd/process.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source3/modules/vfs_aio_pthread.c b/source3/modules/vfs_aio_pthread.c index c1d1a7d518a..da1ca534907 100644 --- a/source3/modules/vfs_aio_pthread.c +++ b/source3/modules/vfs_aio_pthread.c @@ -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->pool, + fsp->conn->sconn->raw_thread_pool, aio_open_worker, opd); if (subreq == NULL) { return -1; diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index f078cef9422..72dbd756735 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -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->pool, + state, ev, handle->conn->sconn->raw_thread_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->pool, + state, ev, handle->conn->sconn->raw_thread_pool, vfs_pwrite_do, state); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); @@ -914,7 +914,8 @@ 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->pool, vfs_fsync_do, state); + state, ev, handle->conn->sconn->raw_thread_pool, + vfs_fsync_do, state); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 77e8f5c0dd6..e75ec5408f3 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -939,7 +939,7 @@ struct smbd_server_connection { } locks; } smb2; - struct pthreadpool_tevent *pool; + struct pthreadpool_tevent *raw_thread_pool; struct smbXsrv_client *client; }; diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 0a4106257f5..8e1fceab0aa 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -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->pool); + &sconn->raw_thread_pool); if (ret != 0) { exit_server("pthreadpool_tevent_init() failed."); } -- 2.34.1