You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, rust-fuse expects either mount or spawn_mount to be called, and these run an event loop, doing blocking reads to the FUSE fd and then dispatching the events read from it to user-implemented callbacks.
In most filesystems of some complexity, IPC, disk IO, or network IO will be performed in response to FUSE events, and it would be nice to be able to perform these asynchronously, e.g. with MIO. But because rust-fuse runs the eventloop itself and hides the FUSE fd, it isn't possible to implement MIO's Evented trait for fuse::Channel (which isn't even exposed in the crate's public API). Asnychronous operation enables higher throughput, so it's desirable to overlap not just multiple requests to the filesystem, but also those requests with IO operations to other OS resources, and it shouldn't be necessary to spawn multiple threads to do so.
If rust-fuse provided a way to get the fd so it can be added to an epoll-based event-loop, as well functions to read a request from the FUSE fd and write a reply to it, this integration would be easy to implement.
The text was updated successfully, but these errors were encountered:
I like the idea, but I'm not sure if this is actually possible. It might not be able to asynchronously use the file descriptor to the kernel driver (see #80), I'm not sure about that.
On the other hand, rust-fuse is meant to encapsulate the kernel communication. I'm not sure how we could expose the fd and still keep a reasonable encapsulation of talking to the kernel driver.
Right now, rust-fuse expects either mount or spawn_mount to be called, and these run an event loop, doing blocking reads to the FUSE fd and then dispatching the events read from it to user-implemented callbacks.
In most filesystems of some complexity, IPC, disk IO, or network IO will be performed in response to FUSE events, and it would be nice to be able to perform these asynchronously, e.g. with MIO. But because rust-fuse runs the eventloop itself and hides the FUSE fd, it isn't possible to implement MIO's Evented trait for fuse::Channel (which isn't even exposed in the crate's public API). Asnychronous operation enables higher throughput, so it's desirable to overlap not just multiple requests to the filesystem, but also those requests with IO operations to other OS resources, and it shouldn't be necessary to spawn multiple threads to do so.
If rust-fuse provided a way to get the fd so it can be added to an epoll-based event-loop, as well functions to read a request from the FUSE fd and write a reply to it, this integration would be easy to implement.
The text was updated successfully, but these errors were encountered: