[thin_restore] first pass at btree_builder.

No tests yet
This commit is contained in:
Joe Thornber
2020-10-26 12:05:27 +00:00
parent f60ae770c2
commit 37ea0280df
9 changed files with 544 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ impl fmt::Display for DeviceDetail {
self.mapped_blocks,
self.transaction_id,
self.creation_time,
self.snapshotted_time);
self.snapshotted_time)?;
Ok(())
}
}

View File

@@ -3,4 +3,5 @@ pub mod device_detail;
pub mod superblock;
pub mod check;
pub mod dump;
pub mod restore;
pub mod xml;

31
src/thin/restore.rs Normal file
View File

@@ -0,0 +1,31 @@
use anyhow::Result;
use std::collections::{BTreeMap, BTreeSet};
use std::path::Path;
use std::sync::{Arc, Mutex};
use crate::io_engine::{AsyncIoEngine, IoEngine, SyncIoEngine};
use crate::pdata::btree::{self, *};
use crate::pdata::space_map::*;
use crate::pdata::unpack::*;
use crate::report::*;
use crate::thin::block_time::*;
use crate::thin::device_detail::*;
use crate::thin::superblock::*;
use crate::thin::xml::{self, MetadataVisitor};
//------------------------------------------
pub struct ThinRestoreOptions<'a> {
pub input: &'a Path,
pub output: &'a Path,
pub async_io: bool,
pub report: Arc<Report>,
}
//------------------------------------------
pub fn restore(opts: ThinRestoreOptions) -> Result<()> {
todo!();
}
//------------------------------------------