pub struct Session { /* private fields */ }Expand description
FUSE session managing the lifecycle from mount to shutdown.
Implementations§
Source§impl Session
impl Session
pub fn new(mount_path: PathBuf, mount_options: MountOptions) -> Result<Self>
Sourcepub fn shutdown_handle(&self) -> SessionShutdownHandle
pub fn shutdown_handle(&self) -> SessionShutdownHandle
Returns a handle that can request graceful session shutdown.
Sourcepub fn with_queue_depth(self, depth: u16) -> Self
pub fn with_queue_depth(self, depth: u16) -> Self
Number of io_uring entries per queue (defaults to DEFAULT_QUEUE_DEPTH = 256).
Sourcepub fn with_worker_count(self, workers: usize) -> Self
pub fn with_worker_count(self, workers: usize) -> Self
Number of worker threads driving io_uring rings (defaults to the number of possible CPUs).
The kernel always allocates one fuse-uring queue per possible CPU
and routes each request to qid = task_cpu() of the caller. So we
must still register entries for every qid in 0..num_possible_cpus,
otherwise requests from un-covered CPUs hang forever. When
worker_count < num_possible_cpus, qids are distributed across
workers in a stride so every qid is covered. Capped at
num_possible_cpus internally; setting more is a no-op.
Sourcepub fn run<F: Filesystem>(self, fs: F) -> Result<()>
pub fn run<F: Filesystem>(self, fs: F) -> Result<()>
Negotiate FUSE_INIT, setup io_uring rings, and run until shutdown. This function blocks the calling thread.