return NT_STATUS_OK;
}
+bool cancel_smb2_aio(struct smb_request *smbreq)
+{
+ struct smbd_smb2_request *smb2req = smbreq->smb2req;
+ struct aio_extra *aio_ex = NULL;
+ int ret;
+
+ if (smbreq) {
+ smb2req = smbreq->smb2req;
+ }
+
+ if (smb2req) {
+ aio_ex = talloc_get_type(smbreq->async_priv,
+ struct aio_extra);
+ }
+
+ if (aio_ex == NULL) {
+ return false;
+ }
+
+ if (aio_ex->fsp == NULL) {
+ return false;
+ }
+
+ ret = SMB_VFS_AIO_CANCEL(aio_ex->fsp, &aio_ex->acb);
+ if (ret != AIO_CANCELED) {
+ return false;
+ }
+
+ return true;
+}
+
/****************************************************************************
Set up an aio request from a SMB2 read call.
*****************************************************************************/
/* We don't need talloc_move here as both aio_ex and
* smbreq are children of smbreq->smb2req. */
aio_ex->smbreq = smbreq;
+ smbreq->async_priv = aio_ex;
DEBUG(10,("smb2: scheduled aio_read for file %s, "
"offset %.0f, len = %u (mid = %u)\n",
/* We don't need talloc_move here as both aio_ex and
* smbreq are children of smbreq->smb2req. */
aio_ex->smbreq = smbreq;
+ smbreq->async_priv = aio_ex;
/* This should actually be improved to span the write. */
contend_level2_oplocks_begin(fsp, LEVEL2_CONTEND_WRITE);
return NT_STATUS_RETRY;
}
+bool cancel_smb2_aio(struct smb_request *smbreq)
+{
+ return false;
+}
+
NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
struct smb_request *smbreq,
files_struct *fsp,