| ... | ... | @@ -369,10 +369,11 @@ pub const IO_Uring = struct { |
| 369 | 369 | /// apply to the write, since the fsync may complete before the write is issued to the disk. |
| 370 | 370 | /// You should preferably use `link_with_next_sqe()` on a write's SQE to link it with an fsync, |
| 371 | 371 | /// or else insert a full write barrier using `drain_previous_sqes()` when queueing an fsync. |
| 372 | | pub fn queue_fsync(self: *IO_Uring, user_data: u64, fd: os.fd_t) !*io_uring_sqe { |
| 372 | pub fn queue_fsync(self: *IO_Uring, user_data: u64, fd: os.fd_t, flags: u32) !*io_uring_sqe { |
| 373 | 373 | const sqe = try self.get_sqe(); |
| 374 | 374 | sqe.opcode = .FSYNC; |
| 375 | 375 | sqe.fd = fd; |
| 376 | sqe.rw_flags = flags; |
| 376 | 377 | sqe.user_data = user_data; |
| 377 | 378 | return sqe; |
| 378 | 379 | } |
| ... | ... | @@ -811,7 +812,7 @@ test "queue_writev/queue_fsync" { |
| 811 | 812 | ring.link_with_next_sqe(sqe_writev); |
| 812 | 813 | testing.expectEqual(@as(u8, linux.IOSQE_IO_LINK), sqe_writev.flags); |
| 813 | 814 | |
| 814 | | var sqe_fsync = try ring.queue_fsync(0xeeeeeeee, fd); |
| 815 | var sqe_fsync = try ring.queue_fsync(0xeeeeeeee, fd, 0); |
| 815 | 816 | testing.expectEqual(fd, sqe_fsync.fd); |
| 816 | 817 | |
| 817 | 818 | testing.expectEqual(@as(u32, 2), ring.sq_ready()); |