On 1/22/25 14:18, Daniel Kral wrote:
On 11/29/24 15:23, Fiona Ebner wrote:
Am 16.09.24 um 18:38 schrieb Daniel Kral:
+sub check_volume_alloc : prototype($$;$) {

Again, "assert_" and "_permission"

Hm, why did you choose permission here?

There are no permission checks done here, would be a suffix like "_allowed" or "_available" also be fine for you?


should/could also live in the storage library as it does not depend on
anything else

ACK


+    my ($storecfg, $storeid, $node) = @_;
+
+    PVE::Storage::storage_check_enabled($storecfg, $storeid, $node);
+    check_storage_content_type($storecfg, $storeid);
+
+    return 1;
+}
+

Also, I'll look whether we really need to decompose the "enabled" check here. At first glance, it'd make sense to always assert whether the storage is enabled since these assertions are mainly done to verify early whether we can allocate images, so the storage must be enabled anyway.

I'll take a closer look and if it doesn't break anything that wouldn't fail later on anyway, I'll move this into "assert_volume_alloc_*".



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to