mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
smbd: rename sconn->raw_thread_pool to sconn->pool
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>
This commit is contained in:
parent
8074922c26
commit
29fc7c7db7
@ -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;
|
||||
|
@ -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)) {
|
||||
|
@ -943,7 +943,7 @@ struct smbd_server_connection {
|
||||
} locks;
|
||||
} smb2;
|
||||
|
||||
struct pthreadpool_tevent *raw_thread_pool;
|
||||
struct pthreadpool_tevent *pool;
|
||||
|
||||
struct smbXsrv_client *client;
|
||||
};
|
||||
|
@ -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.");
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user