storage: centralize shrinking check from qvm-volume to module#475
Open
rustybird wants to merge 7 commits into
Open
storage: centralize shrinking check from qvm-volume to module#475rustybird wants to merge 7 commits into
rustybird wants to merge 7 commits into
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
It only handles a single volume.
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.