[pve-devel] [PATCH v2 qemu-server 4/9] config: memory: add 'max' option
DERUMIER, Alexandre
Alexandre.DERUMIER at groupe-cyllene.com
Mon Jan 30 09:45:30 CET 2023
> > >
> > Just a note: This is exactly how it's done on nic && disk hotplug.
> >
> > for example:
> > vmconfig_update_disk {
> > ...
> > # skip non hotpluggable value
> > if (safe_string_ne($drive->{discard}, $old_drive->{discard}) ||
> > safe_string_ne($drive->{iothread}, $old_drive->{iothread})
> > ||
> > safe_string_ne($drive->{queues}, $old_drive->{queues}) ||
> > safe_string_ne($drive->{cache}, $old_drive->{cache}) ||
> > safe_string_ne($drive->{ssd}, $old_drive->{ssd}) ||
> > safe_string_ne($drive->{ro}, $old_drive->{ro})) {
> > die "skip\n";
> > }
> >
> >
>
> Well, I'm not a fan of that either. At least that is in the same
> module.
>
> To keep the logic inside the Memory.pm module, we could add a
> can_hotplug function and then in QemuServer.pm do
>
> die "skip\n" if !PVE::Memory::can_hotplug($old, $new);
>
> Like that, it's cleanly separated.
>
Ok, no problem. I was going to do something like that.
I think I'll send a v3 tomorrow, I'm currently cleaning the virtio-mem
patches.
More information about the pve-devel
mailing list