#[non_exhaustive]pub enum AnomalyKind {
SuperblockMagicInvalid {
offset: u64,
bytes: [u8; 4],
},
BackupSuperblockDivergence {
cg: u32,
field: &'static str,
primary: u64,
backup: u64,
offset: u64,
},
CgMagicInvalid {
cg: u32,
found: u32,
offset: u64,
},
OrphanedInode {
inode: u64,
nlink: u16,
},
ImpossibleGeometry {
field: &'static str,
value: u64,
limit: u64,
},
}Expand description
Classification of a UFS structural-integrity anomaly (F-INTEGRITY). Each variant carries the evidence needed to reproduce the observation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SuperblockMagicInvalid
The value at the superblock’s fs_magic offset matched neither UFS1
(0x00011954) nor UFS2 (0x19540119) in either byte order — consistent
with corruption or a wiped/overwritten superblock. Carries the offending
bytes and the byte offset they were read at (fail-loud with the value).
Fields
BackupSuperblockDivergence
A per-cylinder-group backup superblock whose decoded geometry differs from the primary — UFS writes a backup superblock in each cylinder group, so a divergence is consistent with a spliced or edited image.
Fields
CgMagicInvalid
A cylinder-group header whose cg_magic is not 0x00090255 — consistent
with corruption or a tampered allocation map. Carries the value found.
Fields
OrphanedInode
An inode marked ALLOCATED in its cylinder group’s inode bitmap, with
di_nlink > 0, that is reachable by NO directory entry from the root —
an inode unlinked while still open, or a corruption lead.
Fields
ImpossibleGeometry
A geometry field beyond what the image can hold — an allocation-bomb / corruption guard. Names the field, the value, and the sane bound.
Implementations§
Trait Implementations§
Source§impl Clone for AnomalyKind
impl Clone for AnomalyKind
Source§fn clone(&self) -> AnomalyKind
fn clone(&self) -> AnomalyKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more