[PATCH pve-storage v1 04/54] common: use Exporter module for PVE::Storage::Common

Max R. Carrara
2026-04-22T11:13:43Z

Expose the existing helpers in `PVE::Storage::Common` via the
`Exporter` module's `import()` function, allowing the helpers to be
imported as-is by other modules.

Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
---
src/PVE/Storage/Common.pm | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
index c031a643..76784e9e 100644
--- a/src/PVE/Storage/Common.pm
+++ b/src/PVE/Storage/Common.pm
@@ -6,6 +6,19 @@ use PVE::JSONSchema;
use PVE::Syscall;
use PVE::Tools qw(run_command);

+use Exporter qw(import);
+
+our @EXPORT_OK = qw(
+ align_size_up
+ deallocate
+
+ qemu_img_create
+ qemu_img_create_qcow2_backed
+ qemu_img_info
+ qemu_img_measure
+ qemu_img_resize
+);
+
use constant {
FALLOC_FL_KEEP_SIZE => 0x01, # see linux/falloc.h
FALLOC_FL_PUNCH_HOLE => 0x02, # see linux/falloc.h
--
2.47.3