diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/liburing.h | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/src/liburing.h b/src/liburing.h index 2e7303c..6b0ce71 100644 --- a/src/liburing.h +++ b/src/liburing.h @@ -115,4 +115,14 @@ static inline void io_uring_prep_poll_remove(struct io_uring_sqe *sqe,  	sqe->addr = (unsigned long) user_data;  } +static inline void io_uring_prep_fsync(struct io_uring_sqe *sqe, int fd, +				       int datasync) +{ +	memset(sqe, 0, sizeof(*sqe)); +	sqe->opcode = IORING_OP_FSYNC; +	sqe->fd = fd; +	if (datasync) +		sqe->fsync_flags = IORING_FSYNC_DATASYNC; +} +  #endif  | 
