Re: [pve-devel] [PATCH v3 pve-zsync 1/2] Refactor locking

2019-10-09 Thread Thomas Lamprecht
On 10/8/19 1:05 PM, Fabian Ebner wrote: >>> @@ -568,55 +570,52 @@ sub get_job { >>>   sub destroy_job { >>>   my ($param) = @_; >>>   +locked("$CONFIG_PATH/cron_and_state.lock", sub { >>>   my $job = get_job($param); >>>   $job->{state} = "del"; >>> - >> nit pick: no need to delete 

Re: [pve-devel] [PATCH v3 pve-zsync 1/2] Refactor locking

2019-10-08 Thread Fabian Ebner
On 10/8/19 11:09 AM, Thomas Lamprecht wrote: On 10/8/19 11:00 AM, Thomas Lamprecht wrote: On 10/7/19 11:16 AM, Fabian Ebner wrote: This introduces a new locked() mechanism allowing to enclose locked sections in a cleaner way. There's only two types of locks namely one for state and cron (they a

Re: [pve-devel] [PATCH v3 pve-zsync 1/2] Refactor locking

2019-10-08 Thread Thomas Lamprecht
On 10/8/19 11:00 AM, Thomas Lamprecht wrote: > On 10/7/19 11:16 AM, Fabian Ebner wrote: >> This introduces a new locked() mechanism allowing to enclose locked >> sections in a cleaner way. There's only two types of locks namely one >> for state and cron (they are always read together and almost alw

Re: [pve-devel] [PATCH v3 pve-zsync 1/2] Refactor locking

2019-10-08 Thread Thomas Lamprecht
On 10/7/19 11:16 AM, Fabian Ebner wrote: > This introduces a new locked() mechanism allowing to enclose locked > sections in a cleaner way. There's only two types of locks namely one > for state and cron (they are always read together and almost always > written together) and one for sync. > > Sig