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
Hello, I am working on a virtual filesystem using fuse-backend-rs for tvix, a Rust implementation of Nix. Most of the underlying filesystem is built on top of async Rust + tokio, so it would be great to be able to use the AsyncFileSystem trait. I've tried doing this but I've hit some issues figuring out how to drive the filesystem with both FUSE and virtiofs.
For FUSE it looks like there is some code to support driving async FUSE tasks:
let fs = Vfs::<AsyncDriver,()>::new(VfsOptions::default());
let _server = Arc::new(Server::<Vfs<AsyncDriver,()>,AsyncDriver,()>::new(fs));
let file = vmm_sys_util::tempfile::TempFile::new().unwrap();
let _fd = file.as_file().as_raw_fd();
letmut executor = AsyncExecutor::new(32);
executor.setup().unwrap();
/*
// Create three tasks, which could handle three concurrent fuse requests.
let mut task = FuseDevTask::new(0x1000, fd, server.clone(), state.clone());
executor
.spawn(async move { task.poll_handler().await })
.unwrap();
let mut task = FuseDevTask::new(0x1000, fd, server.clone(), state.clone());
executor
.spawn(async move { task.poll_handler().await })
.unwrap();
let mut task = FuseDevTask::new(0x1000, fd, server.clone(), state.clone());
executor
.spawn(async move { task.poll_handler().await })
.unwrap();
*/
for _i in0..10{
executor.run_once(false).unwrap();
}
// Set existing flag
state.quiesce();
// Close the fusedev fd, so all pending async io requests will be aborted.
drop(file);
for _i in0..10{
executor.run_once(false).unwrap();
}
}
}
}
However, this code is behind the async_io feature flag, even though the real feature flag is async-io. The code here also seems to refer to things that have been deleted like use crate::async_util::{AsyncDriver, AsyncExecutor}.
I was wondering if async is something that is supported or if its currently in a broken state and needs some more help to become functional again?
The text was updated successfully, but these errors were encountered:
That one is not a type. It has been disabled intentionally, since there are some compilation issues (from what I remember). Once I have some more time in the coming weeks, I'll open a PR to fix them.
Hello, I am working on a virtual filesystem using fuse-backend-rs for tvix, a Rust implementation of Nix. Most of the underlying filesystem is built on top of async Rust + tokio, so it would be great to be able to use the
AsyncFileSystem
trait. I've tried doing this but I've hit some issues figuring out how to drive the filesystem with both FUSE and virtiofs.For FUSE it looks like there is some code to support driving async FUSE tasks:
fuse-backend-rs/src/transport/fusedev/linux_session.rs
Lines 691 to 868 in 839f5db
However, this code is behind the
async_io
feature flag, even though the real feature flag isasync-io
. The code here also seems to refer to things that have been deleted likeuse crate::async_util::{AsyncDriver, AsyncExecutor}
.I was wondering if async is something that is supported or if its currently in a broken state and needs some more help to become functional again?
The text was updated successfully, but these errors were encountered: