> - return nexenta_get_zvol_size($scfg, "$scfg->{pool}/$name"), > + my $ret = nexenta_get_zvol_size($scfg, "$scfg->{pool}/$name"); > + $ret =~ m/^(\d+)$/ or die "size is not valid"; Can we do those check inside nexenta_get_zvol_size()?