pub struct KernelConfig { /* private fields */ }Expand description
Parameters for setting up the connection with FUSE driver and the kernel side behavior.
Implementations§
Source§impl KernelConfig
impl KernelConfig
Sourcepub fn async_read(&mut self, enabled: bool) -> &mut Self
pub fn async_read(&mut self, enabled: bool) -> &mut Self
Specify that the filesystem supports asynchronous read requests.
Enabled by default.
Sourcepub fn atomic_o_trunc(&mut self, enabled: bool) -> &mut Self
pub fn atomic_o_trunc(&mut self, enabled: bool) -> &mut Self
Specify that the filesystem supports the O_TRUNC open flag.
Enabled by default.
Sourcepub fn auto_inval_data(&mut self, enabled: bool) -> &mut Self
pub fn auto_inval_data(&mut self, enabled: bool) -> &mut Self
Specify that the kernel check the validity of attributes on every read.
Enabled by default.
Sourcepub fn async_dio(&mut self, enabled: bool) -> &mut Self
pub fn async_dio(&mut self, enabled: bool) -> &mut Self
Specify that the filesystem supports asynchronous direct I/O submission.
Enabled by default.
Sourcepub fn parallel_dirops(&mut self, enabled: bool) -> &mut Self
pub fn parallel_dirops(&mut self, enabled: bool) -> &mut Self
Specify that the kernel supports parallel directory operations.
Enabled by default.
Sourcepub fn handle_killpriv(&mut self, enabled: bool) -> &mut Self
pub fn handle_killpriv(&mut self, enabled: bool) -> &mut Self
Specify that the filesystem is responsible for unsetting setuid and setgid bits when a file is written, truncated, or its owner is changed.
Enabled by default.
Sourcepub fn posix_locks(&mut self, enabled: bool) -> &mut Self
pub fn posix_locks(&mut self, enabled: bool) -> &mut Self
The filesystem supports the POSIX-style file lock.
Sourcepub fn flock_locks(&mut self, enabled: bool) -> &mut Self
pub fn flock_locks(&mut self, enabled: bool) -> &mut Self
Specify that the filesystem supports the flock handling.
Sourcepub fn export_support(&mut self, enabled: bool) -> &mut Self
pub fn export_support(&mut self, enabled: bool) -> &mut Self
Specify that the filesystem supports lookups of "." and "..".
Sourcepub fn dont_mask(&mut self, enabled: bool) -> &mut Self
pub fn dont_mask(&mut self, enabled: bool) -> &mut Self
Specify that the kernel should not apply the umask to the file mode
on create operations.
Sourcepub fn writeback_cache(&mut self, enabled: bool) -> &mut Self
pub fn writeback_cache(&mut self, enabled: bool) -> &mut Self
Specify that the kernel should enable writeback caching.
Sourcepub fn posix_acl(&mut self, enabled: bool) -> &mut Self
pub fn posix_acl(&mut self, enabled: bool) -> &mut Self
Specify that the filesystem supports POSIX access control lists.
Sourcepub fn max_pages(&mut self, enabled: bool) -> &mut Self
pub fn max_pages(&mut self, enabled: bool) -> &mut Self
Specify that the value of max_pages should be derived from max_write.
Sourcepub fn readdirplus(&mut self, enabled: bool) -> &mut Self
pub fn readdirplus(&mut self, enabled: bool) -> &mut Self
Specify that the filesystem supports readdirplus operations.
Sourcepub fn readdirplus_auto(&mut self, enabled: bool) -> &mut Self
pub fn readdirplus_auto(&mut self, enabled: bool) -> &mut Self
Indicates that the kernel uses the adaptive readdirplus.
This option is meaningful only if readdirplus is enabled.
Sourcepub fn max_readahead(&mut self, value: u32) -> &mut Self
pub fn max_readahead(&mut self, value: u32) -> &mut Self
Set the maximum readahead.
Sourcepub fn max_write(&mut self, value: u32) -> &mut Self
pub fn max_write(&mut self, value: u32) -> &mut Self
Set the maximum size of the write buffer.
§Panic
It causes an assertion panic if the setting value is less than the absolute minimum.
Sourcepub fn max_background(&mut self, max_background: u16) -> &mut Self
pub fn max_background(&mut self, max_background: u16) -> &mut Self
Return the maximum number of pending background requests.
Sourcepub fn congestion_threshold(&mut self, threshold: u16) -> &mut Self
pub fn congestion_threshold(&mut self, threshold: u16) -> &mut Self
Set the threshold number of pending background requests that the kernel marks the filesystem as congested.
If the setting value is 0, the value is automatically calculated by using max_background.
§Panics
It cause a panic if the setting value is greater than max_background.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelConfig
impl RefUnwindSafe for KernelConfig
impl Send for KernelConfig
impl Sync for KernelConfig
impl Unpin for KernelConfig
impl UnwindSafe for KernelConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more