summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--selftest/knownfail.d/compound_async1
-rw-r--r--source3/smbd/smb2_aio.c11
2 files changed, 10 insertions, 2 deletions
diff --git a/selftest/knownfail.d/compound_async b/selftest/knownfail.d/compound_async
deleted file mode 100644
index ee987713ba0..00000000000
--- a/selftest/knownfail.d/compound_async
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.compound_async.read_read\(fileserver\)
diff --git a/source3/smbd/smb2_aio.c b/source3/smbd/smb2_aio.c
index 6b04063ba30..8c01c76a3e9 100644
--- a/source3/smbd/smb2_aio.c
+++ b/source3/smbd/smb2_aio.c
@@ -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;
}