Add barrier fsync test case
Also changes the fsync prep helper to require passing in the actual flag, not just a boolean for fsync vs fdatasync. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -131,13 +131,12 @@ static inline void io_uring_prep_poll_remove(struct io_uring_sqe *sqe,
|
||||
}
|
||||
|
||||
static inline void io_uring_prep_fsync(struct io_uring_sqe *sqe, int fd,
|
||||
int datasync)
|
||||
unsigned fsync_flags)
|
||||
{
|
||||
memset(sqe, 0, sizeof(*sqe));
|
||||
sqe->opcode = IORING_OP_FSYNC;
|
||||
sqe->fd = fd;
|
||||
if (datasync)
|
||||
sqe->fsync_flags = IORING_FSYNC_DATASYNC;
|
||||
sqe->fsync_flags = fsync_flags;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user