]> git.proxmox.com Git - pve-common.git/commitdiff
Implement refcounting for flocks
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 10 Feb 2016 07:25:23 +0000 (08:25 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 10 Feb 2016 10:12:12 +0000 (11:12 +0100)
This was already implemented in PVE::LXC::lock_aquire() and
lock_release(). Enabling refcounting in the general
PVE::Tools::lock_file() and lock_file_full() methods allows
us to use one code base for flocking.

Furthermore, we could get rid of various xx_no_lock methods
that were required because the old non-refcounting version
did not support nested flocks (the inner most flock would
close the file handle and thus release the flock).


No differences found