On 1/28/2020 1:31 PM, Vitaliy Filippov wrote: > Hi everyone, > > Can someone point out if io_uring may reorder write and fsync requests? > > If I submit a write request and an fsync request at the same time, does > that mean that fsync will sync that write request, or does it only sync > completed requests? Yes, it can reorder them. So, there are 2 ways: - wait for the completion - order the requests within io_uring I'd recommend the ordering option by using IOSQE_IO_LINK, which guarantees sequential execution of linked requests. There is also IOSQE_IO_DRAIN, but it's rather inefficient. -- Pavel Begunkov