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

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Jul 29 13:15:14 CEST 2025


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 at 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;
 }
-- 
2.47.2





More information about the pve-devel mailing list