Commit 8cb300de by Karsa Zoltán István

bugfix

parent 3eb04d1b
......@@ -864,7 +864,7 @@ class VmCreateDiskForm(OperationForm):
help_text=_('Metadata cache size, '
'like KB, MB'))
cluster_size = forms.CharField(
widget=FileSizeWidget, initial=(1 << 14), label=_('Cluster size'),
widget=FileSizeWidget, initial=(1 << 16), label=_('Cluster size'),
help_text=_('Disk cluster (block) size, '
'like KB'))
......
# Generated by Django 3.2.3 on 2023-09-18 14:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('storage', '0007_disk_cache_size'),
]
operations = [
migrations.AddField(
model_name='disk',
name='cluster_size',
field=models.IntegerField(default=64, help_text='Disk cluster (block) size (Kbyte)', verbose_name='cluster size'),
),
]
......@@ -366,7 +366,6 @@ class Disk(TimeStampedModel):
'size': self.size,
'base_name': self.base.filename if self.base else None,
'type': 'snapshot' if self.base else 'normal',
'cache_size': self.cache_size,
'base_dir': self.base.datastore.path if self.base else None,
'cluster_size': self.cluster_size
}
......
......@@ -297,7 +297,7 @@ class CreateDiskOperation(InstanceOperation):
if not name:
name = "new disk"
disk = Disk.create(size=size, name=name, datastore=datastore.name, type="qcow2-norm", cache_size=cache_size)
disk = Disk.create(size=size, name=name, datastore=datastore.name, type="qcow2-norm", cache_size=cache_size, cluster_size=cluster_size)
disk.full_clean()
devnums = list(ascii_lowercase)
for d in self.instance.disks.all():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment