refactor disk/storage checks for Disk API

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2018-09-25 10:38:00 +02:00
committed by Thomas Lamprecht
parent 94836d7b8c
commit 76c1e57be7
6 changed files with 27 additions and 21 deletions

View File

@ -149,7 +149,7 @@ __PACKAGE__->register_method ({
my $node = $param->{node};
$dev = PVE::Diskmanage::verify_blockdev_path($dev);
die "device $dev is already in use\n" if PVE::Diskmanage::disk_is_used($dev);
PVE::Diskmanage::check_unused($dev);
my $worker = sub {
PVE::Diskmanage::locked_disk_action(sub {