[pve-devel] [PATCH v2 pve-zsync] Improve locking and state handling
Fabian Ebner
f.ebner at proxmox.com
Mon Oct 7 08:46:02 CEST 2019
On 10/3/19 1:06 PM, Fabian Ebner wrote:
> On the one hand 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.
> On the other hand it improves checks regarding states. A
> 'waiting' state is introduced and other 'waiting' and 'syncing'
> instances of the same job are now detected. Also there are
> two new checks that allow disabling a job while it is 'syncing' or
> 'waiting'. Previously sync would re-enable such a job involuntarily.
> Disabling a 'waiting' job causes it to not sync anymore.
>
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
I'll re-send this as two patches, since adding the checks is independent
of refactoring the locking.
More information about the pve-devel
mailing list