From 6d0d0a977da5a70d0a7049cf3549e7a6594b7e77 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 9 Apr 2021 13:48:27 +0200 Subject: [PATCH] rbd: indentation and whitespace cleanups Signed-off-by: Thomas Lamprecht --- PVE/Storage/RBDPlugin.pm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm index af34743..1566571 100644 --- a/PVE/Storage/RBDPlugin.pm +++ b/PVE/Storage/RBDPlugin.pm @@ -147,7 +147,7 @@ sub run_rbd_command { *STDERR->flush(); }; } - + eval { run_command($cmd, %args); }; if (my $err = $@) { die $errmsg . $lasterr if length($lasterr); @@ -290,7 +290,7 @@ sub properties { description => "Pool.", type => 'string', }, - namespace=> { + namespace => { description => "RBD Namespace.", type => 'string', }, @@ -723,7 +723,6 @@ sub volume_snapshot_delete { } sub volume_snapshot_needs_fsfreeze { - return 1; } @@ -738,14 +737,13 @@ sub volume_has_feature { sparseinit => { base => 1, current => 1}, }; - my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) = - $class->parse_volname($volname); + my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) = $class->parse_volname($volname); my $key = undef; - if($snapname){ + if ($snapname){ $key = 'snap'; - }else{ - $key = $isBase ? 'base' : 'current'; + } else { + $key = $isBase ? 'base' : 'current'; } return 1 if $features->{$feature}->{$key}; -- 2.39.2