[pve-devel] [PATCH qemu-server 1/2] move checks to top
Dietmar Maurer
dietmar at proxmox.com
Tue Jun 13 17:11:12 CEST 2017
I think this change is wrong!
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> PVE/QemuConfig.pm | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
> index 3f59b4c..6f9bde9 100644
> --- a/PVE/QemuConfig.pm
> +++ b/PVE/QemuConfig.pm
> @@ -71,6 +71,9 @@ sub get_replicatable_volumes {
> my $test_volid = sub {
> my ($volid, $attr) = @_;
>
> + return if $attr->{cdrom};
> + return if !$cleanup && !$attr->{replicate};
> +
> my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, $noerr);
> return if !$storeid;
>
> @@ -80,12 +83,8 @@ sub get_replicatable_volumes {
> my ($path, $owner, $vtype) = PVE::Storage::path($storecfg, $volid);
> return if !$owner || ($owner != $vmid);
>
> - return if $attr->{cdrom};
> -
> die "unable to replicate volume '$volid', type '$vtype'\n" if $vtype ne
> 'images';
>
> - return if !$cleanup && !$attr->{replicate};
> -
> if (!PVE::Storage::volume_has_feature($storecfg, 'replicate', $volid)) {
> return if $cleanup || $noerr;
> die "missing replicate feature on volume '$volid'\n";
> --
> 2.11.0
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list