From ac4f3d4e4cf16b1097249a819fe7111b2674b3f4 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 30 Dec 2018 17:19:40 -0700 Subject: [PATCH] aioring: remove IOCB_FLAG_HIPRI New API doesn't require the setting of this flag at runtime, it's implied from the io context. Signed-off-by: Jens Axboe --- engines/aioring.c | 13 +------------ t/aio-ring.c | 4 ---- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/engines/aioring.c b/engines/aioring.c index 88641a93..f836009d 100644 --- a/engines/aioring.c +++ b/engines/aioring.c @@ -21,10 +21,6 @@ #ifdef ARCH_HAVE_AIORING -#ifndef IOCB_FLAG_HIPRI -#define IOCB_FLAG_HIPRI (1 << 2) -#endif - /* * io_setup2(2) flags */ @@ -193,7 +189,6 @@ static int fio_aioring_prep(struct thread_data *td, struct io_u *io_u) { struct aioring_data *ld = td->io_ops_data; struct fio_file *f = io_u->file; - struct aioring_options *o = td->eo; struct iocb *iocb; iocb = &ld->iocbs[io_u->index]; @@ -208,10 +203,7 @@ static int fio_aioring_prep(struct thread_data *td, struct io_u *io_u) iocb->u.c.buf = io_u->xfer_buf; iocb->u.c.nbytes = io_u->xfer_buflen; iocb->u.c.offset = io_u->offset; - if (o->hipri) - iocb->u.c.flags |= IOCB_FLAG_HIPRI; - else - iocb->u.c.flags = 0; + iocb->u.c.flags = 0; } else if (ddir_sync(io_u->ddir)) io_prep_fsync(iocb, f->fd); @@ -503,9 +495,6 @@ static int fio_aioring_post_init(struct thread_data *td) iocb = &ld->iocbs[i]; iocb->u.c.buf = io_u->buf; iocb->u.c.nbytes = td_max_bs(td); - - if (o->hipri) - iocb->u.c.flags |= IOCB_FLAG_HIPRI; } } diff --git a/t/aio-ring.c b/t/aio-ring.c index 2fd7ac61..c0c5009e 100644 --- a/t/aio-ring.c +++ b/t/aio-ring.c @@ -22,8 +22,6 @@ #include #include -#define IOCB_FLAG_HIPRI (1 << 2) - #define IOCTX_FLAG_IOPOLL (1 << 0) #define IOCTX_FLAG_SCQRING (1 << 1) /* Use SQ/CQ rings */ #define IOCTX_FLAG_FIXEDBUFS (1 << 2) @@ -133,8 +131,6 @@ static void init_io(struct submitter *s, int fd, struct iocb *iocb) iocb->aio_fildes = fd; iocb->aio_lio_opcode = IO_CMD_PREAD; iocb->u.c.offset = offset; - if (polled) - iocb->u.c.flags = IOCB_FLAG_HIPRI; if (!fixedbufs) iocb->u.c.nbytes = BS; } -- 2.25.1