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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the approach for resizing and deleting devices #1
Document the approach for resizing and deleting devices #1
Changes from all commits
9c93609
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's elaborate a bit in the most technical part how all this could be achieved.
Let's start with a small reminder on how resizing works in the current SpaceMaker.
Taking that into account, the following steps/changes could be inserted in the general
AgamaProposal
algorithm to handle all the reasonable situations.First of all, Beware the usage of "current" can lead to strange situations like:
Those cases should be watched. The steps below assume that does not happen.
Step 1. When calculating the SpaceMaker actions, generate one shrink for every partition in which min is smaller than the current size.
How to determine the size of the shrink action?
The action is mandatory if the max is smaller than the current size. Otherwise is optional.
Step 2. To be done on every attempt. That is:
Step 3. When distributing extra space at the end of the algorithm
Take into account partitions that could_grow and are right before the space
A general notes regarding the order in which we decide what to delete: maybe we should prioritize to delete partitions that are after a partition that needs to grow. If I remember correctly, the only criteria is starting by the end of the disk, but it could be way smarter.