1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

smbd: Add pthreadpool_tevent to smbd_server_connection

Prerequisite to convert the vfs _send/recv functions

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke
2016-08-08 15:07:30 +02:00
committed by Jeremy Allison
parent 2e0990fef2
commit afb86d3450
2 changed files with 19 additions and 0 deletions

View File

@ -33,6 +33,7 @@
#include "lib/asys/asys.h"
#include "lib/util/tevent_ntstatus.h"
#include "lib/util/sys_rw.h"
#include "lib/pthreadpool/pthreadpool_tevent.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
@ -750,6 +751,20 @@ fail:
return false;
}
static int vfswrap_init_pool(struct smbd_server_connection *conn)
{
int ret;
if (conn->pool != NULL) {
return 0;
}
ret = pthreadpool_tevent_init(conn, lp_aio_max_threads(),
&conn->pool);
return ret;
}
struct vfswrap_asys_state {
struct asys_context *asys_ctx;
struct tevent_req *req;