async_fuser/ll/flags/fopen_flags.rs
1//! Flags returned in open response.
2
3use bitflags::bitflags;
4
5bitflags! {
6 /// Flags returned in open response.
7 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
8 pub struct FopenFlags: u32 {
9 /// bypass page cache for this open file
10 const FOPEN_DIRECT_IO = 1 << 0;
11 /// don't invalidate the data cache on open
12 const FOPEN_KEEP_CACHE = 1 << 1;
13 /// the file is not seekable
14 const FOPEN_NONSEEKABLE = 1 << 2;
15 /// allow caching this directory
16 const FOPEN_CACHE_DIR = 1 << 3;
17 /// the file is stream-like (no file position at all)
18 const FOPEN_STREAM = 1 << 4;
19 /// kernel skips sending FUSE_FLUSH on close
20 const FOPEN_NOFLUSH = 1 << 5;
21 /// allow multiple concurrent writes on the same direct-IO file
22 const FOPEN_PARALLEL_DIRECT_WRITES = 1 << 6;
23 /// the file is fd-backed (via the backing_id field)
24 const FOPEN_PASSTHROUGH = 1 << 7;
25 /// purge cached attributes on open
26 #[cfg(target_os = "macos")]
27 const FOPEN_PURGE_ATTR = 1 << 30;
28 /// purge unified buffer cache on open
29 #[cfg(target_os = "macos")]
30 const FOPEN_PURGE_UBC = 1 << 31;
31 }
32}