use O_DIRECT as preferred

Signed-off-by: Yuchen Liang <yuchen@neon.tech>
This commit is contained in:
Yuchen Liang
2024-10-01 03:57:58 +00:00
parent 2607a57990
commit f48ab8bcaa

View File

@@ -1005,7 +1005,11 @@ pub mod virtual_file {
impl IoMode {
pub const fn preferred() -> Self {
Self::Buffered
if cfg!(target_os = "linux") {
Self::Direct
} else {
Self::Buffered
}
}
}