vfs_aio_pthread: don't allow async opens when multi channel is enabled.
authorStefan Metzmacher <metze@samba.org>
Fri, 26 Feb 2021 11:31:29 +0000 (12:31 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 29 Mar 2021 19:36:37 +0000 (19:36 +0000)
We will get this supported later, but for now just disable async
opens as fsp->mid may not belong the first xconn of client->connections.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14449

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_aio_pthread.c

index 6724e73984ccc96dfae9bba2a6c361a2c598002d..685f91d9f2baec33f0e241fd3bbf06156593ce1c 100644 (file)
@@ -464,6 +464,13 @@ static int aio_pthread_openat_fn(vfs_handle_struct *handle,
                return -1;
        }
 
+       if (fsp->conn->sconn->client->server_multi_channel_enabled) {
+               /*
+                * This module is not compatible with multi channel yet.
+                */
+               aio_allow_open = false;
+       }
+
        if (!aio_allow_open) {
                /* aio opens turned off. */
                return openat(fsp_get_io_fd(dirfsp),