Skip to content

Commit

Permalink
chore: remove some uncessary deps (#450)
Browse files Browse the repository at this point in the history
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
  • Loading branch information
MrCroxx committed Apr 28, 2024
1 parent 06bdf7c commit 90bca34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions foyer-storage/Cargo.toml
Expand Up @@ -25,13 +25,10 @@ foyer-memory = { version = "0.3", path = "../foyer-memory" }
futures = "0.3"
itertools = "0.12"
lazy_static = "1"
libc = "0.2"
lz4 = "1.24"
memoffset = "0.9"
parking_lot = { version = "0.12", features = ["arc_lock"] }
paste = "1.0"
prometheus = "0.13"
rand = "0.8.5"
serde = { workspace = true }
thiserror = "1"
tokio = { workspace = true }
Expand Down
5 changes: 4 additions & 1 deletion foyer-storage/src/device/fs.rs
Expand Up @@ -26,6 +26,9 @@ use itertools::Itertools;
use super::{allocator::AlignedAllocator, asyncify, Device, DeviceError, DeviceResult, IoBuf, IoBufMut, IoRange};
use crate::region::RegionId;

#[cfg(target_os = "linux")]
const O_DIRECT: i32 = 0x4000;

#[derive(Debug)]
pub struct FsDeviceConfigBuilder {
pub dir: PathBuf,
Expand Down Expand Up @@ -301,7 +304,7 @@ impl FsDevice {
{
use std::os::unix::fs::OpenOptionsExt;
if config.direct {
opts.custom_flags(libc::O_DIRECT);
opts.custom_flags(O_DIRECT);
}
}

Expand Down

0 comments on commit 90bca34

Please sign in to comment.