8000
Skip to content

Storage: Define per-pool default block size#14594

Merged
tomponline merged 10 commits intocanonical:mainfrom
hamistao:pool_default_block_sizes
Dec 9, 2024
Merged

Storage: Define per-pool default block size#14594
tomponline merged 10 commits intocanonical:mainfrom
hamistao:pool_default_block_sizes

Conversation

@hamistao
Copy link
Copy Markdown
@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
Comment thread lxd/scriptlet/instance_placement.go Outdated
// 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
Copy Markdown
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
Copy Markdown
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
hamistao added 10 commits December 9, 2024 03:09
Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
All drivers share a common default block size value with the exception
of PowerFlex.

Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
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 <pedro.ribeiro@canonical.com>
Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
…ported

This is aligned with the behavior of the other drivers.

Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
@hamistao hamistao force-pushed the pool_default_block_sizes branch from f14e1a9 to 0aff592 Compare December 9, 2024 06:13
Comment thread lxd/storage/drivers/driver_powerflex_volumes.go
Comment thread lxd/storage/utils.go
@tomponline tomponline merged commit a863105 into canonical:main Dec 9, 2024
@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

0