summaryrefslogtreecommitdiff
path: root/harness/cases/aio_setup.h
diff options
context:
space:
mode:
Diffstat (limited to 'harness/cases/aio_setup.h')
-rw-r--r--harness/cases/aio_setup.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/harness/cases/aio_setup.h b/harness/cases/aio_setup.h
index 37c9618..1914915 100644
--- a/harness/cases/aio_setup.h
+++ b/harness/cases/aio_setup.h
@@ -1,3 +1,4 @@
+#include <time.h>
io_context_t io_ctx;
#define BAD_CTX ((io_context_t)-1)
@@ -58,6 +59,9 @@ int sync_submit(struct iocb *iocb)
#define WRITE 'w'
#define READ_SILENT 'R'
#define WRITE_SILENT 'W'
+#define READV '<'
+#define WRITEV '>'
+
int attempt_rw(int fd, void *buf, int count, long long pos, int rw, int expect)
{
struct iocb iocb;
@@ -75,6 +79,12 @@ int attempt_rw(int fd, void *buf, int count, long long pos, int rw, int expect)
case WRITE:
io_prep_pwrite(&iocb, fd, buf, count, pos);
break;
+ case WRITEV:
+ io_prep_pwritev(&iocb, fd, buf, count, pos);
+ break;
+ case READV:
+ io_prep_preadv(&iocb, fd, buf, count, pos);
+ break;
}
if (!silent) {