>>The following should also work:
>>
>>  $size = PVE::Storage::volume_size_info($storecfg, $volid, 1);

>>And is a timeout of 1 second enough? 

I think is enough, I never had problem with 1s. But I'll retry with differents 
storage to be sure.


----- Mail original ----- 

De: "Dietmar Maurer" <[email protected]> 
À: "Alexandre DERUMIER" <[email protected]> 
Cc: [email protected] 
Envoyé: Mercredi 5 Juin 2013 07:35:34 
Objet: RE: [pve-devel] update disk config, always rescan all the storage, can 
we avoid that ? 

> This should do the job: 
> 
> my $size = undef; 
> 
> eval{ 
> 
> ($size) = PVE::Storage::volume_size_info($storecfg, $volid, 1); 

The following should also work: 

$size = PVE::Storage::volume_size_info($storecfg, $volid, 1); 

And is a timeout of 1 second enough? 

> }; 
> die "voluem does not exits" if $@;; 
> 
> I can rebase my patch if you want 

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

Reply via email to