mark_returned() was append-only without checking if the key already existed, causing duplicates to accumulate across hook invocations. load_returned() then returned all entries including duplicates, which made the returned count exceed the seen count, causing a u64 underflow in the pre-seeded calculation. Fix: check load_returned() before appending in mark_returned(), dedup on read in load_returned(), and use saturating_sub for the pre-seeded count as a safety net. Co-Authored-By: ProofOfConcept <poc@bcachefs.org> |
||
|---|---|---|
| .. | ||
| defaults | ||
| schema | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||
| config.example.jsonl | ||