Cleanup.
This commit is contained in:
@@ -16,10 +16,9 @@ This is still in very early development, so expect old maps to no longer work.
|
||||
- [x] Recover from saved map.
|
||||
- [x] Backup old map before truncating for new.
|
||||
- [ ] Recovery
|
||||
- [x] Initial
|
||||
- [x] Initial / Patchworking
|
||||
Technically there is an outstanding issue with sleepy firmware here,
|
||||
but beside that this technically works.
|
||||
- [ ] Patchworking
|
||||
- [ ] Isolate
|
||||
- [ ] Scraping
|
||||
- [ ] CLI
|
||||
@@ -65,7 +64,7 @@ patchworking pass, this sector-at-a-time reading can be minimized, hopefully
|
||||
reducing wear and overall recovery time on drives with a very short spin-down
|
||||
delay.
|
||||
|
||||
### Scraping
|
||||
### Scraping (Stage::BruteForceAndDesperation)
|
||||
|
||||
This is the pure brute force, sector-at-a-time read. This has identical
|
||||
behaviour to `ddrescue`'s scraping phase.
|
||||
|
||||
@@ -83,24 +83,6 @@ impl MapFile {
|
||||
let mut recover_stage = Stage::Damaged;
|
||||
|
||||
for cluster in self.map.iter() {
|
||||
/*
|
||||
match cluster.stage {
|
||||
Stage::Patchwork { depth } => {if recover_stage > (Stage::Patchwork { depth })},
|
||||
Stage::Isolate => {
|
||||
if recover_stage == Stage::Damaged || cluster.stage < recover_stage {
|
||||
// Note that recover_stage after first condition is
|
||||
// only ever Stage::ForIsolation(_), thus PartialEq,
|
||||
// PartialOrd are useful for comparing the internal value.
|
||||
recover_stage = cluster.stage
|
||||
}
|
||||
},
|
||||
Stage::BruteForceAndDesperation => {
|
||||
if recover_stage > Stage::BruteForceAndDesperation ||
|
||||
}
|
||||
Stage::Damaged | Stage::Intact => (),
|
||||
}
|
||||
*/
|
||||
|
||||
if cluster.stage < recover_stage {
|
||||
recover_stage = cluster.stage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user