Skip to main content

btrfs_cli/rescue/
clear_space_cache.rs

1use crate::{Format, Runnable};
2use anyhow::Result;
3use clap::Parser;
4use std::path::PathBuf;
5
6#[derive(Debug, Clone, Copy, PartialEq, Eq, clap::ValueEnum)]
7pub enum SpaceCacheVersion {
8    V1,
9    V2,
10}
11
12/// Completely remove the v1 or v2 free space cache
13#[derive(Parser, Debug)]
14pub struct RescueClearSpaceCacheCommand {
15    /// Free space cache version to remove
16    version: SpaceCacheVersion,
17
18    /// Path to the btrfs device
19    device: PathBuf,
20}
21
22impl Runnable for RescueClearSpaceCacheCommand {
23    fn run(&self, _format: Format, _dry_run: bool) -> Result<()> {
24        todo!("implement rescue clear-space-cache")
25    }
26}