[pve-devel] [PATCH storage 01/26] btrfs: remove unnecessary mkpath call

Wolfgang Bumiller
2025-07-29T11:15:34Z

The existence of the original volume should imply the existence of its
parent directory, after all... And with the new typed subdirectories
this was wrong.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
src/PVE/Storage/BTRFSPlugin.pm | 3 ---
1 file changed, 3 deletions(-)

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 26eef2b..bd2c0bf 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -529,9 +529,6 @@ sub volume_snapshot {
$snap_path = raw_file_to_subvol($snap_path);
}

- my $snapshot_dir = $class->get_subdir($scfg, 'images') . "/$vmid";
- mkpath $snapshot_dir;
-
$class->btrfs_cmd(['subvolume', 'snapshot', '-r', '--', $path, $snap_path]);
return undef;
}