Skip to content
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

Storage: Define per-pool default block size #14594

Merged
merged 10 commits into from
Dec 9, 2024

Conversation

hamistao
Copy link
Contributor

@hamistao hamistao commented Dec 6, 2024

This includes some improvements that were originally a part of the fix implemented in #14511, but ended up not being needed for that fix. They are still nice to have and thus were included here.

@hamistao hamistao requested a review from roosterfish December 6, 2024 07:52
@hamistao hamistao marked this pull request as ready for review December 6, 2024 08:31
@@ -221,7 +221,12 @@ func InstancePlacementRun(ctx context.Context, l logger.Logger, s *state.State,

// Apply VM root disk size defaults if not specified.
if req.Type == api.InstanceTypeVM && rootDiskSizeStr == "" {
rootDiskSizeStr = storageDrivers.DefaultBlockSize
driver, err := storageDrivers.Load(s, rootDiskConfig["pool"], "", nil, nil, nil, nil)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please can you add a function like storageDrivers.DefaultVMBlockFilesystemSize for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a function under storage/util that helps with this, I hope this is along the lines of what you expected.
If so, this is ready for a review.

@hamistao hamistao force-pushed the pool_default_block_sizes branch from b9e7305 to f14e1a9 Compare December 9, 2024 05:15
All drivers share a common default block size value with the exception
of PowerFlex.

Signed-off-by: hamistao <[email protected]>
Created in the `storage` package to make use of `LoadByName` can't use
it on `storage/drivers` because of import cycle.

Signed-off-by: hamistao <[email protected]>
…ported

This is aligned with the behavior of the other drivers.

Signed-off-by: hamistao <[email protected]>
@hamistao hamistao force-pushed the pool_default_block_sizes branch from f14e1a9 to 0aff592 Compare December 9, 2024 06:13
@tomponline tomponline merged commit a863105 into canonical:main Dec 9, 2024
27 checks passed
@hamistao hamistao deleted the pool_default_block_sizes branch December 9, 2024 14:36
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.

2 participants