1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Deleted-record recovery leads from copy-on-write residue.
//!
//! `APFS-DELETED-INODE-RECOVERABLE` (Medium) — a superseded inode/dir record
//! still present in an older checkpoint or unreaped block;
//! `APFS-DELETED-EXTENT-CARVE-CANDIDATE` (Low) — extent blocks marked free in
//! the spaceman bitmap (a *candidate*, NOT a recoverability guarantee: TRIM,
//! encryption, zeroing, and reuse races intervene — content must be validated);
//! `APFS-REAPER-PENDING-OBJECT` (Low) — object queued in the reaper;
//! `APFS-ORPHAN-INODE` (Low) — inode with no referencing `DIR_REC`.
//!
//! Validated against an INDEPENDENT oracle (real images / pre-delete capture +
//! apfsck), not only records we deleted ourselves.
use crateAnomalyKind;
/// Surface deleted-but-present recovery leads from the reaper queue.
///
/// Objects queued in the reaper are logically deleted but still physically
/// present (`APFS-REAPER-PENDING-OBJECT`). The further recovery leads in the
/// design — superseded-checkpoint inodes (`APFS-DELETED-INODE-RECOVERABLE`),
/// free-marked extent blocks (`APFS-DELETED-EXTENT-CARVE-CANDIDATE`), and orphan
/// inodes (`APFS-ORPHAN-INODE`) — require an independent oracle (a real image or
/// pre-delete capture + `apfsck`) to validate without false positives, so they
/// are layered in as that corpus becomes available.
///
/// `reaper_paddr` and `mappings` come from the open container
/// ([`apfs_core::ApfsContainer::reaper_paddr`] /
/// [`apfs_core::ApfsContainer::checkpoint_mappings`]).
///
/// # Errors
/// Surfaces an [`apfs_core::ApfsError`] from reading the reaper.
/// Pure mapping (Humble Object): each reaper-pending object id → a Low
/// `APFS-REAPER-PENDING-OBJECT` residue lead.