io_uring drain
io_uring drain is a submission flag that delays a request until earlier requests in the same ring finish and delays later requests until the drain request finishes.
Drain orders completion within one ring; it is not a device-cache flush. [1] The documented API forbids mixing IO_DRAIN with IOSQE_CQE_SKIP_SUCCESS in one ring, including on separate requests. [2]
Relations
- related
- io-uring, io-uring-linked-requests, fsync, persistence-ordering
Advantages
- Can establish a ring-scoped dependency before a synchronization request.
Limitations
- It does not order another ring or validate earlier write results.