mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 13:14:11 +00:00
migrate: simplify code and add comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
d213ba299d
commit
95b3583b5e
@ -339,10 +339,9 @@ sub prepare {
|
|||||||
# check if storage is available on both nodes
|
# check if storage is available on both nodes
|
||||||
my $scfg = PVE::Storage::storage_check_enabled($storecfg, $sid);
|
my $scfg = PVE::Storage::storage_check_enabled($storecfg, $sid);
|
||||||
|
|
||||||
my $targetsid;
|
my $targetsid = $sid;
|
||||||
if ($scfg->{shared}) {
|
# NOTE: we currently ignore shared source storages in mappings so skip here too for now
|
||||||
$targetsid = $sid;
|
if (!$scfg->{shared}) {
|
||||||
} else {
|
|
||||||
$targetsid = PVE::QemuServer::map_storage($self->{opts}->{storagemap}, $sid);
|
$targetsid = PVE::QemuServer::map_storage($self->{opts}->{storagemap}, $sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,10 +480,9 @@ sub scan_local_volumes {
|
|||||||
# check if storage is available on both nodes
|
# check if storage is available on both nodes
|
||||||
my $scfg = PVE::Storage::storage_check_enabled($storecfg, $sid);
|
my $scfg = PVE::Storage::storage_check_enabled($storecfg, $sid);
|
||||||
|
|
||||||
my $targetsid;
|
my $targetsid = $sid;
|
||||||
if ($scfg->{shared}) {
|
# NOTE: we currently ignore shared source storages in mappings so skip here too for now
|
||||||
$targetsid = $sid;
|
if (!$scfg->{shared}) {
|
||||||
} else {
|
|
||||||
$targetsid = PVE::QemuServer::map_storage($self->{opts}->{storagemap}, $sid);
|
$targetsid = PVE::QemuServer::map_storage($self->{opts}->{storagemap}, $sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user