]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Fix schedule_smb2_aio_read() to allow the last read in a compound to go...
authorJeremy Allison <jra@samba.org>
Fri, 18 Nov 2022 18:50:35 +0000 (10:50 -0800)
committerRalph Boehme <slow@samba.org>
Thu, 1 Dec 2022 16:04:07 +0000 (16:04 +0000)
Remove knownfail.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Dec  1 16:04:07 UTC 2022 on sn-devel-184

selftest/knownfail.d/compound_async [deleted file]
source3/smbd/smb2_aio.c

diff --git a/selftest/knownfail.d/compound_async b/selftest/knownfail.d/compound_async
deleted file mode 100644 (file)
index ee98771..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.compound_async.read_read\(fileserver\)
index 6b04063ba30d6f1f0ebdbd9fb9da64272aa45657..8c01c76a3e94341cb68fda79622a6a96b3fc609b 100644 (file)
@@ -289,6 +289,8 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
        struct aio_extra *aio_ex;
        size_t min_aio_read_size = lp_aio_read_size(SNUM(conn));
        struct tevent_req *req;
+       bool is_compound = false;
+       bool is_last_in_compound = false;
        bool ok;
 
        ok = vfs_valid_pread_range(startpos, smb_maxcnt);
@@ -316,7 +318,14 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
                return NT_STATUS_RETRY;
        }
 
-       if (smbd_smb2_is_compound(smbreq->smb2req)) {
+       is_compound = smbd_smb2_is_compound(smbreq->smb2req);
+       is_last_in_compound = smbd_smb2_is_last_in_compound(smbreq->smb2req);
+
+       if (is_compound && !is_last_in_compound) {
+               /*
+                * Only allow going async if this is the last
+                * request in a compound.
+                */
                return NT_STATUS_RETRY;
        }