Why O_DIRECT no longer exists in libc

Unless you know what you are doing, you should probably not use O_DIRECT. Mixing O_DIRECT and regular accesses or mmap on the same file is likely to result in corruption, as does resizing a file or allocating not yet allocated blocks in the file for a while that is also accessed with O_DIRECT as O_DIRECT doesn't enforce cache coherence with metadata changes and regular reads/writes. It also puts restrictions on the alignment of your reads and writes. See also Clarifying Direct IO's Semantics - Ext4, linux - What does O_DIRECT really mean? - Stack Overflow and (for a rant why Linus dislikes O_DIRECT) https://yarchive.net/comp/linux/o_direct.html.