How are the O_SYNC and O_DIRECT flags in open(2) different/alike?
O_DIRECT alone only promises that the kernel will avoid copying data from user space to kernel space, and will instead write it directly via DMA (Direct memory access; if possible). Data does not go into caches. There is no strict guarantee that the function will return only after all data has been transferred. O_SYNC guarantees … Read more