[pve-devel] [PATCH 25/31] iscsidirect : add copy feature

Alexandre Derumier aderumier at odiso.com
Tue Jan 22 12:36:23 CET 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Storage/ISCSIDirectPlugin.pm |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/PVE/Storage/ISCSIDirectPlugin.pm b/PVE/Storage/ISCSIDirectPlugin.pm
index 41b8786..ffde4d7 100644
--- a/PVE/Storage/ISCSIDirectPlugin.pm
+++ b/PVE/Storage/ISCSIDirectPlugin.pm
@@ -210,7 +210,14 @@ sub volume_snapshot_delete {
 
 sub volume_has_feature {
     my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_;
-    
+
+   my $features = {
+        copy => { current => 1},
+    };
+
+    my $snap = $snapname ? 'snap' : 'current';
+    return 1 if $features->{$feature}->{$snap};
+
     return undef;
 }
 
-- 
1.7.10.4




More information about the pve-devel mailing list