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>
#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
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;
struct smbXsrv_session *session;
};
+struct pthreadpool_tevent;
+
struct smbd_server_connection {
const struct tsocket_address *local_address;
const struct tsocket_address *remote_address;
struct asys_context *asys_ctx;
struct tevent_fd *asys_fde;
+ struct pthreadpool_tevent *pool;
+
struct smbXsrv_client *client;
};