Repository navigation
fix(minimald): trim the state volume on every tick and at quiesce - #1744
norrietaylor merged 1 commit into
Conversation
The guest only returned freed disk space to the host when the periodic maintenance trim ran, and only when the preceding cache clean succeeded. A failed sweep therefore stranded the extents earlier work had already freed, and a clean shutdown reclaimed nothing at all. Run the trim unconditionally on both maintenance tick paths, and trim best-effort in quiesce_state_volume before teardown so a clean stop returns every freed extent to the host. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthrough
ChangesState-volume trim flows
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: 🔵 Low · up to A failed cache clean can queue a trim that overlaps shutdown, potentially trimming the filesystem beneath the detached state-volume mountpoint. This is a bounded operational risk, so the change remains mergeable with owner awareness. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the volume trim, Comment |
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABTSyXrQ
The guest only returned freed disk space to the host when the periodic
maintenance trim ran, and only when the preceding cache clean succeeded.
A failed sweep stranded extents earlier work had already freed, and a
clean shutdown reclaimed nothing at all.
This change runs the trim unconditionally on both maintenance tick paths,
and trims best-effort in
quiesce_state_volumebefore teardown so a cleanstop returns every freed extent to the host.
Verification
cargo fmt --all --check— cleancargo build --workspace --locked— cleancargo clippy -p minimald --locked -- -D warnings -A clippy::result_unit_err— cleancargo test -p minimald --lib maintenance— 3 passedWorkspace-wide
clippy/testreport pre-existing failures unrelated tothis change:
result_unit_erronsession_host.rs(tree pins Rust 1.97.0;sandbox has 1.98.0 where the lint is new) and netns/checkouts tests that
need privileges or a clean
/tmpthis sandbox lacks.Summary by CodeRabbit