O_DIRECT
Is there a precise defintion of the Linux O_DIRECT semantics, in particularly addressing desired behavior in the cases of:
1) inodes opened more than once (some with and some without O_DIRECT) - do the other open file instances get disabled caching?
2) consistency of mmap data and sendfile data (how could this work without write through of the page cache?) when inode is opened O_DIRECT
If the goal of O_DIRECT is not only to bypass the local client's page cache, but also to bypass the 4K read/write page size (and allow larger read, writes), is it acceptable for an fs to handle files opened O_DIRECT to disable caching by turning off calls to generic_file_read and generic_file_write for reads and writes to that inode (after a sync)? If not, is there a conventional "no cache" mount option used by other filesystems to do the equivalent on a mounted volume?