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>
- struct pthreadpool_tevent *sync_thread_pool;
struct pthreadpool_tevent *raw_thread_pool;
struct smbXsrv_client *client;
struct pthreadpool_tevent *raw_thread_pool;
struct smbXsrv_client *client;
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_dfsblobs.h"
#include "lib/tsocket/tsocket.h"
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_dfsblobs.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
const char *vfs_user;
struct smbd_server_connection *sconn;
const char *servicename = lp_const_servicename(snum);
const char *vfs_user;
struct smbd_server_connection *sconn;
const char *servicename = lp_const_servicename(snum);
sconn = talloc_zero(ctx, struct smbd_server_connection);
if (sconn == NULL) {
sconn = talloc_zero(ctx, struct smbd_server_connection);
if (sconn == NULL) {
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;
conn = conn_new(sconn);
sconn->msg_ctx = msg;
conn = conn_new(sconn);
const char *locaddr = NULL;
const char *remaddr = NULL;
int ret;
const char *locaddr = NULL;
const char *remaddr = NULL;
int ret;
NTSTATUS status;
struct timeval tv = timeval_current();
NTTIME now = timeval_to_nttime(&tv);
NTSTATUS status;
struct timeval tv = timeval_current();
NTTIME now = timeval_to_nttime(&tv);
ret = pthreadpool_tevent_init(sconn, lp_aio_max_threads(),
&sconn->raw_thread_pool);
if (ret != 0) {
ret = pthreadpool_tevent_init(sconn, lp_aio_max_threads(),
&sconn->raw_thread_pool);
if (ret != 0) {
- exit_server("pthreadpool_tevent_init(raw) 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.");
- }
+ exit_server("pthreadpool_tevent_init() failed.");
}
if (lp_server_max_protocol() >= PROTOCOL_SMB2_02) {
}
if (lp_server_max_protocol() >= PROTOCOL_SMB2_02) {