fuchsia_storage_benchmarks_lib/filesystems/
minfs.rsuse crate::filesystems::FsManagementFilesystemInstance;
use async_trait::async_trait;
use storage_benchmarks::{BlockDeviceConfig, BlockDeviceFactory, FilesystemConfig};
#[derive(Clone)]
pub struct Minfs;
#[async_trait]
impl FilesystemConfig for Minfs {
type Filesystem = FsManagementFilesystemInstance;
async fn start_filesystem(
&self,
block_device_factory: &dyn BlockDeviceFactory,
) -> FsManagementFilesystemInstance {
let block_device = block_device_factory
.create_block_device(&BlockDeviceConfig { use_zxcrypt: true, fvm_volume_size: None })
.await;
FsManagementFilesystemInstance::new(
fs_management::Minfs::default(),
block_device,
None,
false,
)
.await
}
fn name(&self) -> String {
"minfs".to_owned()
}
}
#[cfg(test)]
mod tests {
use super::Minfs;
use crate::filesystems::testing::check_filesystem;
#[fuchsia::test]
async fn start_minfs() {
check_filesystem(Minfs).await;
}
}