fuchsia_storage_benchmarks_lib/filesystems/
f2fs.rsuse crate::filesystems::FsManagementFilesystemInstance;
use async_trait::async_trait;
use storage_benchmarks::{BlockDeviceConfig, BlockDeviceFactory, FilesystemConfig};
#[derive(Clone)]
pub struct F2fs;
#[async_trait]
impl FilesystemConfig for F2fs {
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: Some(100 * 1024 * 1024),
})
.await;
FsManagementFilesystemInstance::new(
fs_management::F2fs::default(),
block_device,
None,
false,
)
.await
}
fn name(&self) -> String {
"f2fs".to_owned()
}
}
#[cfg(test)]
mod tests {
use super::F2fs;
use crate::filesystems::testing::check_filesystem;
#[fuchsia::test]
async fn start_f2fs() {
check_filesystem(F2fs).await;
}
}