]> git.proxmox.com Git - pve-storage.git/commit - PVE/API2/Disks/LVMThin.pm
api: disks: create: re-check disk after fork/lock
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 28 Sep 2021 11:39:41 +0000 (13:39 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 30 Sep 2021 16:04:22 +0000 (18:04 +0200)
commite99bc248d474796b64b7ef1d75d864cdd0b9d5df
treebb0fe5cc6c85b26557e41c4ecc1befc2d686a28e
parentdcd8f3a3dd91d86c7cc446d2cab8030be5ff41da
api: disks: create: re-check disk after fork/lock

Because then it might not be unused anymore. If there really is a
race, this prevents e.g. sgdisk creating a partition on a device
already in use by LVM or LVM destroying a partitioned device.

For ZFS, also get the latest udev info once inside the worker.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/API2/Disks/Directory.pm
PVE/API2/Disks/LVM.pm
PVE/API2/Disks/LVMThin.pm
PVE/API2/Disks/ZFS.pm