[pve-devel] [PATCH 06/10] iscsidirect : has_feature : copy
Alexandre Derumier
aderumier at odiso.com
Thu Feb 14 17:27:36 CET 2013
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Storage/ISCSIDirectPlugin.pm | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/PVE/Storage/ISCSIDirectPlugin.pm b/PVE/Storage/ISCSIDirectPlugin.pm
index a2bd38f..e13e4e6 100644
--- a/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/PVE/Storage/ISCSIDirectPlugin.pm
@@ -222,6 +222,21 @@ sub volume_snapshot_delete {
sub volume_has_feature {
my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_;
+ my $features = {
+ copy => { current => 1},
+ };
+
+ my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
+ $class->parse_volname($volname);
+
+ my $key = undef;
+ if($snapname){
+ $key = $snapname
+ }else{
+ $key = $isBase ? 'base' : 'current';
+ }
+ return 1 if $features->{$feature}->{$key};
+
return undef;
}
--
1.7.10.4
More information about the pve-devel
mailing list