From: AurĂ©lien Bombo <[email protected]>

984a32f17e8d introduced support for prep_writev2 as released in liburing 2.2
and libaio 0.3.111. However, it also broke users of older versions of these
libraries (without prep_writev2) who relied on flags being no-op, so we remove
the check on flags.

Fixes: 984a32f17e8d

Signed-off-by: AurĂ©lien Bombo <[email protected]>
---
 block/io_uring.c  | 1 -
 block/linux-aio.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/block/io_uring.c b/block/io_uring.c
index dd4f304910..b44edcd7a4 100644
--- a/block/io_uring.c
+++ b/block/io_uring.c
@@ -349,7 +349,6 @@ static int luring_do_submit(int fd, LuringAIOCB *luringcb, 
LuringState *s,
                               luringcb->qiov->niov, offset, luring_flags);
     }
 #else
-        assert(flags == 0);
         io_uring_prep_writev(sqes, fd, luringcb->qiov->iov,
                              luringcb->qiov->niov, offset);
 #endif
diff --git a/block/linux-aio.c b/block/linux-aio.c
index c200e7ad20..1aa65cf09b 100644
--- a/block/linux-aio.c
+++ b/block/linux-aio.c
@@ -383,7 +383,6 @@ static int laio_do_submit(int fd, struct qemu_laiocb 
*laiocb, off_t offset,
         io_prep_pwritev2(iocbs, fd, qiov->iov, qiov->niov, offset, laio_flags);
     }
 #else
-        assert(flags == 0);
         io_prep_pwritev(iocbs, fd, qiov->iov, qiov->niov, offset);
 #endif
         break;
-- 
2.49.1

Reply via email to