[pve-devel] [PATCH container 2/2] Don't hold flock for whole backup operation

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Jan 19 11:30:20 CET 2016


> Fabian Grünbichler <f.gruenbichler at proxmox.com> hat am 19. Januar 2016 um
> 11:20 geschrieben:
> 
> @@ -192,16 +196,12 @@ sub prepare {
>  
>  sub lock_vm {
>      my ($self, $vmid) = @_;
> -
>      PVE::LXC::lock_aquire($vmid);
>  }
>  
>  sub unlock_vm {
>      my ($self, $vmid) = @_;
> -
> -    &$unlockconfig($self, $vmid);
> -
> -    PVE::LXC::lock_release($vmid);
> +    PVE::LXC::lock_container($vmid, 60, $unlockconfig, ($self, $vmid));
>  }
>  
>  sub snapshot {
> -- 
> 2.1.4
> 

The lock_container() call should of course have the regular timeout of 10
seconds, not 60..

Regards,
Fabian




More information about the pve-devel mailing list