* write / fsync ordering
@ 2020-01-28 10:31 Vitaliy Filippov
2020-01-28 10:46 ` Pavel Begunkov
0 siblings, 1 reply; 3+ messages in thread
From: Vitaliy Filippov @ 2020-01-28 10:31 UTC (permalink / raw)
To: [email protected]
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?
--
With best regards,
Vitaliy Filippov
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: write / fsync ordering
2020-01-28 10:31 write / fsync ordering Vitaliy Filippov
@ 2020-01-28 10:46 ` Pavel Begunkov
2020-01-28 10:55 ` Vitaliy Filippov
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Begunkov @ 2020-01-28 10:46 UTC (permalink / raw)
To: Vitaliy Filippov, [email protected], Jens Axboe
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-28 10:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-28 10:31 write / fsync ordering Vitaliy Filippov
2020-01-28 10:46 ` Pavel Begunkov
2020-01-28 10:55 ` Vitaliy Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox