Re: write / fsync ordering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux