vfs_aio_pthread: don't allow async opens when multi channel is enabled. master-multichannel
authorStefan Metzmacher <metze@samba.org>
Fri, 26 Feb 2021 11:31:29 +0000 (12:31 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Feb 2023 09:29:18 +0000 (10:29 +0100)
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>
(cherry picked from commit 2c194c0bc61958b9f569b3808b45035c2de6caef)

source3/modules/vfs_aio_pthread.c

index eea1af8b4b68ad9b3a24590df81989d5e9ed032b..5d051b4f7da67c9abd406131aff74eeeba4f8466 100644 (file)
@@ -468,6 +468,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_pathref_fd(dirfsp),