[pve-devel] [PATCH 2/4] nexenta: retrieve parent of a clone
Alexandre Derumier
aderumier at odiso.com
Wed Nov 21 18:11:32 CET 2012
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Storage/NexentaPlugin.pm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/PVE/Storage/NexentaPlugin.pm b/PVE/Storage/NexentaPlugin.pm
index a5b6fe2..386656f 100644
--- a/PVE/Storage/NexentaPlugin.pm
+++ b/PVE/Storage/NexentaPlugin.pm
@@ -45,6 +45,13 @@ sub nexenta_get_zvol_size {
return nexenta_request($scfg, 'get_child_prop', 'zvol', $zvol, 'size_bytes');
}
+sub nexenta_get_zvol_props {
+ my ($scfg, $zvol) = @_;
+
+ my $props = nexenta_request($scfg, 'get_child_props', 'zvol', $zvol, '');
+ return $props;
+}
+
sub nexenta_list_lun_mapping_entries {
my ($scfg, $zvol) = @_;
@@ -106,9 +113,12 @@ sub nexenta_list_zvol {
$owner = $2;
}
+ my $props = nexenta_get_zvol_props($scfg, $zvol);
+
$list->{$pool}->{$image} = {
name => $image,
- size => nexenta_get_zvol_size($scfg, $zvol),
+ size => $props->{size_bytes},
+ parent => $props->{origin},
format => 'raw',
vmid => $owner
};
--
1.7.10.4
More information about the pve-devel
mailing list