pub struct Server<F: FileSystem + Sync> { /* private fields */ }
Expand description
Fuse Server to handle requests from the Fuse client and vhost user master.
Implementations§
Source§impl<F: AsyncFileSystem + Sync> Server<F>
impl<F: AsyncFileSystem + Sync> Server<F>
Sourcepub async unsafe fn async_handle_message<S: BitmapSlice>(
&self,
r: Reader<'_, S>,
w: Writer<'_, S>,
vu_req: Option<&mut dyn FsCacheReqHandler>,
hook: Option<&dyn MetricsHook>,
) -> Result<usize>
pub async unsafe fn async_handle_message<S: BitmapSlice>( &self, r: Reader<'_, S>, w: Writer<'_, S>, vu_req: Option<&mut dyn FsCacheReqHandler>, hook: Option<&dyn MetricsHook>, ) -> Result<usize>
Main entrance to handle requests from the transport layer.
It receives Fuse requests from transport layers, parses the request according to Fuse ABI, invokes filesystem drivers to server the requests, and eventually send back the result to the transport layer.
§Safety
The async io framework borrows underlying buffers from Reader
and Writer
, so the caller
must ensure all data buffers managed by the Reader
and Writer
are valid until the
Future
object returned has completed. Other subsystems, such as the transport layer, rely
on the invariant.
Source§impl<F: FileSystem + Sync> Server<F>
impl<F: FileSystem + Sync> Server<F>
Sourcepub fn notify_inval_entry<S: BitmapSlice>(
&self,
w: FuseDevWriter<'_, S>,
parent: u64,
name: &CStr,
) -> Result<usize>
pub fn notify_inval_entry<S: BitmapSlice>( &self, w: FuseDevWriter<'_, S>, parent: u64, name: &CStr, ) -> Result<usize>
Use to send notify msg to kernel fuse
Sourcepub fn notify_resend<S: BitmapSlice>(
&self,
w: FuseDevWriter<'_, S>,
) -> Result<()>
pub fn notify_resend<S: BitmapSlice>( &self, w: FuseDevWriter<'_, S>, ) -> Result<()>
Send a resend notification message to the kernel via FUSE. This function should be invoked as part of the crash recovery routine. Given that FUSE initialization does not occur again during recovery, the capability to support resend notifications may not be automatically detected. It is the responsibility of the upper layers to verify and persist the kernel’s support for this feature upon the initial FUSE setup.
Sourcepub fn handle_message<S: BitmapSlice>(
&self,
r: Reader<'_, S>,
w: Writer<'_, S>,
vu_req: Option<&mut dyn FsCacheReqHandler>,
hook: Option<&dyn MetricsHook>,
) -> Result<usize>
pub fn handle_message<S: BitmapSlice>( &self, r: Reader<'_, S>, w: Writer<'_, S>, vu_req: Option<&mut dyn FsCacheReqHandler>, hook: Option<&dyn MetricsHook>, ) -> Result<usize>
Main entrance to handle requests from the transport layer.
It receives Fuse requests from transport layers, parses the request according to Fuse ABI, invokes filesystem drivers to server the requests, and eventually send back the result to the transport layer.