looks OK to me - comments inline:

> -     eval  { run_command($cmd, timeout => $statefile ? undef : 30,
> -                 umask => 0077); };

my %run_params = (timeout => $statefile ? undef : 30, umask => 0077)

> +        if ($conf->{hugepages}) {
> +         my $code = sub {
> +             my $hugepages_topology =
> PVE::QemuServer::Memory::hugepages_topology($conf);
> +             PVE::QemuServer::Memory::hugepages_mount();
> +             
> PVE::QemuServer::Memory::hugepages_allocate($hugepages_topology);
> +
> +             run_command($cmd, timeout => $statefile ? undef : 30,
> +                 umask => 0077);

run_command($cmd, %run_params);

> +         };
> +         eval { PVE::QemuServer::Memory::hugepages_update_locked($code) };
> +
> +     } else {
> +         eval  { run_command($cmd, timeout => $statefile ? undef : 30,
> +                     umask => 0077); 

 eval { run_command($cmd, %run_params);

>};
> +     }
>  
>       if (my $err = $@) {
>           # deactivate volumes if start fails

_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to