[pve-devel] [PATCH v2 qemu-server 4/9] config: memory: add 'max' option

DERUMIER, Alexandre Alexandre.DERUMIER at groupe-cyllene.com
Fri Jan 27 16:03:28 CET 2023


> 
> > +    # skip non hotpluggable value
> > +    if (safe_num_ne($newmem->{max}, $oldmem->{max})) {
> > +       die "skip\n";
> > +    }
> 
> Please move this to the call sites. The "die "skip""-logic should not
> cross function boundaries.
> 
> 
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";
   }





More information about the pve-devel mailing list