Skip to content

storage: centralize shrinking check from qvm-volume to module#475

Open
rustybird wants to merge 7 commits into
QubesOS:mainfrom
rustybird:volume-shrinking-check-centralization
Open

storage: centralize shrinking check from qvm-volume to module#475
rustybird wants to merge 7 commits into
QubesOS:mainfrom
rustybird:volume-shrinking-check-centralization

Conversation

@rustybird

Copy link
Copy Markdown
Contributor

No description provided.

rustybird added 5 commits July 3, 2026 13:01
The only method in admin.pool.volume.* that actually exists is List;
everything else related to volumes lives in admin.vm.volume.*
Shrinking is already allowed by admin.vm.volume.Resize and implemented
by file-reflink.
'extend' is already just a legacy alias for 'resize'. It looked odd to
continue using the former name in the implementation, since it has been
able to shrink volumes for a long time.
Ensure that other (e.g. GUI) callers of volume.resize() are also
protected against shrinking, unless they opt into it by passing
allow_shrink=True.

If the safety check fails, the (slightly fleshed out) message still
mentions 'qvm-volume resize --force' because this is the only tool
featuring such an override.
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.79%. Comparing base (b8a948d) to head (49d56e6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #475   +/-   ##
=======================================
  Coverage   76.79%   76.79%           
=======================================
  Files          53       53           
  Lines        9402     9408    +6     
=======================================
+ Hits         7220     7225    +5     
- Misses       2182     2183    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

marmarek pushed a commit to QubesOS/qubes-core-admin that referenced this pull request Jul 16, 2026
…ist)

The only method in admin.pool.volume.* that actually exists is List;
everything else related to volumes lives in admin.vm.volume.*

Also remove the already commented out names in test_994_dom0_only_calls.
There is a *non* commented out List as well, which is not removed.

Equivalent cleanup on the client side is part of
QubesOS/qubes-core-admin-client#475 (commit
"tests/storage: remove phantom admin.pool.volume.* tests")
marmarek pushed a commit to QubesOS/qubes-core-admin that referenced this pull request Jul 17, 2026
…ist)

The only method in admin.pool.volume.* that actually exists is List;
everything else related to volumes lives in admin.vm.volume.*

Also remove the already commented out names in test_994_dom0_only_calls.
There is a *non* commented out List as well, which is not removed.

Equivalent cleanup on the client side is part of
QubesOS/qubes-core-admin-client#475 (commit
"tests/storage: remove phantom admin.pool.volume.* tests")

(cherry picked from commit 519aa57)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant