Hi!

I am just analysing the Storage class and plugins and discovered that
activate_storage in Storage.pm and also activate_storage in the plugins is
executed cyclically.

The reason is, that "cache" is always a new hash and therefore
  "if $cache->{activated}->{$storeid};" in activate_storage(Storage.pm) will
be never true.

I printed a call stack and found this:
  pvestatd.pm::update_storage_status -> PVE::Storage::storage_info

PVE::Storage::storage_info uses always a fresh hash:
  my $info = {};
when calling
  PVE::Storage::activate_storage
And even PVE::Storage::activate_storage may use a fresh hash:
  $cache = {} if !$cache;

Is this an intended behaviour?
If yes, I can't rely in a storage plugin on the stored cache data.
  What is the intention of the cache, if it is always new?

BR,
   Jasmin
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to