1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

Revert "smbd: introduce sconn->sync_thread_pool"

This reverts commit 0c97226356f2ba5f01a58d361371055caf11e2a7.

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:
Ralph Boehme 2018-12-23 09:34:00 +01:00 committed by Stefan Metzmacher
parent cedbfbd9b8
commit 8074922c26
3 changed files with 1 additions and 28 deletions

View File

@ -943,7 +943,6 @@ struct smbd_server_connection {
} locks; } locks;
} smb2; } smb2;
struct pthreadpool_tevent *sync_thread_pool;
struct pthreadpool_tevent *raw_thread_pool; struct pthreadpool_tevent *raw_thread_pool;
struct smbXsrv_client *client; struct smbXsrv_client *client;

View File

@ -33,7 +33,6 @@
#include "libcli/security/security.h" #include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_dfsblobs.h" #include "librpc/gen_ndr/ndr_dfsblobs.h"
#include "lib/tsocket/tsocket.h" #include "lib/tsocket/tsocket.h"
#include "lib/pthreadpool/pthreadpool_tevent.h"
/********************************************************************** /**********************************************************************
Parse a DFS pathname of the form \hostname\service\reqpath Parse a DFS pathname of the form \hostname\service\reqpath
@ -253,7 +252,6 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx,
const char *vfs_user; const char *vfs_user;
struct smbd_server_connection *sconn; struct smbd_server_connection *sconn;
const char *servicename = lp_const_servicename(snum); const char *servicename = lp_const_servicename(snum);
int ret;
sconn = talloc_zero(ctx, struct smbd_server_connection); sconn = talloc_zero(ctx, struct smbd_server_connection);
if (sconn == NULL) { if (sconn == NULL) {
@ -277,16 +275,6 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx,
return NT_STATUS_NO_MEMORY; return NT_STATUS_NO_MEMORY;
} }
/*
* We only provide sync threadpools.
*/
ret = pthreadpool_tevent_init(sconn, 0, &sconn->sync_thread_pool);
if (ret != 0) {
TALLOC_FREE(sconn);
return NT_STATUS_NO_MEMORY;
}
sconn->raw_thread_pool = sconn->sync_thread_pool;
sconn->msg_ctx = msg; sconn->msg_ctx = msg;
conn = conn_new(sconn); conn = conn_new(sconn);

View File

@ -3907,7 +3907,6 @@ void smbd_process(struct tevent_context *ev_ctx,
const char *locaddr = NULL; const char *locaddr = NULL;
const char *remaddr = NULL; const char *remaddr = NULL;
int ret; int ret;
size_t max_threads;
NTSTATUS status; NTSTATUS status;
struct timeval tv = timeval_current(); struct timeval tv = timeval_current();
NTTIME now = timeval_to_nttime(&tv); NTTIME now = timeval_to_nttime(&tv);
@ -3953,20 +3952,7 @@ void smbd_process(struct tevent_context *ev_ctx,
ret = pthreadpool_tevent_init(sconn, lp_aio_max_threads(), ret = pthreadpool_tevent_init(sconn, lp_aio_max_threads(),
&sconn->raw_thread_pool); &sconn->raw_thread_pool);
if (ret != 0) { if (ret != 0) {
exit_server("pthreadpool_tevent_init(raw) failed."); exit_server("pthreadpool_tevent_init() failed.");
}
max_threads = pthreadpool_tevent_max_threads(sconn->raw_thread_pool);
if (max_threads == 0) {
/*
* We only have a sync pool, no need to create a 2nd one.
*/
sconn->sync_thread_pool = sconn->raw_thread_pool;
} else {
ret = pthreadpool_tevent_init(sconn, 0, &sconn->sync_thread_pool);
if (ret != 0) {
exit_server("pthreadpool_tevent_init(sync) failed.");
}
} }
if (lp_server_max_protocol() >= PROTOCOL_SMB2_02) { if (lp_server_max_protocol() >= PROTOCOL_SMB2_02) {