> Also, I was thinking to replace
> 
> "
> PVE::Storage::foreach_volid($dl, sub {
>              my ($volumeid) = @_;
>              if($volumeid eq $volid) {
>                      $foundvolid = 1;
>                      return;
>              }
> });
> die "image '$path' does not exists\n" if (!(-f $path || -b $path ||
> $foundvolid)); "
> 
> By a specific storage plugin sub, like volume_exist.
> 
> - Nexenta,netapp for example, have api to check directly if the volume exist
> without need to parse all volumes. (listing all volumes take more time for
> theses storage) This way, we could use the best/fastest method for each
> storage plugin.
> 
> What do you think about it ?

Not sure about that.

First, I though a call to  activate_volume() should 'die' if a volume does not 
exists? But the nexenta
plugin simply 'return 1'

Second, we have volume_size_info() - should that raise an exeption  if the 
volume does not exists?

_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to