]> git.proxmox.com Git - pve-container.git/commit
api: resize: fork before locking
authorFiona Ebner <f.ebner@proxmox.com>
Tue, 30 May 2023 13:52:07 +0000 (15:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Jun 2023 17:27:57 +0000 (19:27 +0200)
commitf0595e61425a68d648d9a5fd28fcacbd144cc8fe
tree999d252dedf123f029bf58690aee06be8d12cc88
parente8620a014ad482336a2e2f7d57c40de49ecca1cc
api: resize: fork before locking

making sure the early checks are done once before the expensive
forking and locking and once after locking, because the state might
have changed.

The size calculation had to be adapted a bit, to ensure the original
size is not added twice when it's a request with a leading '+'.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
src/PVE/API2/LXC.pm