pub struct AuditReport {
pub anomalies: Vec<Anomaly>,
pub inodes_visited: u32,
pub entries_scanned: u64,
pub directories_scanned: u32,
pub anomalies_count: u64,
pub initial_anomalies_count: u64,
pub repaired_count: u64,
}Expand description
Summary returned by audit. Empty anomalies means the subset
of invariants checked all held.
Fields§
§anomalies: Vec<Anomaly>Every problem found, in no particular order. Populated by the
legacy audit entry point; left empty by
audit_with_callbacks (it streams findings through the
caller’s closure to avoid buffering on huge volumes).
inodes_visited: u32Number of distinct inodes visited via directory entries.
entries_scanned: u64Number of directory entries scanned (including ., .., and tombstones).
directories_scanned: u32Number of directories scanned.
anomalies_count: u64Authoritative current count of anomalies on the
filesystem. After audit / audit_with_callbacks this
is the count from the single scan. After a repair pass
(audit_with_repair with repair = true) this is the
post-repair re-scan count — the actual remaining
problems on disk, NOT the pre-repair number minus repaired
(which would be unreliable if our repair logic itself
introduces new anomalies).
initial_anomalies_count: u64Number of anomalies the audit ORIGINALLY found, before any
repair commits. Equal to anomalies_count for non-repair
runs. After a repair pass: initial_anomalies_count - repaired_count is what we expect to remain; the actual
anomalies_count from the post-repair re-scan is what
REALLY remains. Discrepancies between the two are how we
notice repair logic has bugs.
repaired_count: u64Anomalies the repair pass actually mutated the disk to fix.
Always zero unless audit_with_repair ran with repair = true.
A repair that failed midway leaves this counter at the number of
successfully-committed fixes — partial progress is intentional
(each commit is its own journal transaction so a crash mid-pass
can’t compound the damage).