From 12f608d828c36e97ab1041d30227fdbd05630497 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Fri, 27 May 2022 15:00:51 +0200 Subject: [PATCH] btrbk: fix regression: clear realpath cache on mkdir On btrbk archive, after creating a directory without dry-run, the archive target is skipped with "Failed to fetch subvolume detail" due to caching of realpath. Regression in btrbk-0.32.0: eb69bc883e btrbk: refactor mountinfo --- btrbk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/btrbk b/btrbk index 3dcd00f..fa9019d 100755 --- a/btrbk +++ b/btrbk @@ -2060,6 +2060,7 @@ sub system_mkdir($) ); end_transaction("mkdir", defined($ret)); return undef unless(defined($ret)); + delete $realpath_cache{$vol->{URL}}; return 1; } @@ -6040,6 +6041,7 @@ MAIN: $droot->{node} = $archive_root->{node}; $droot->{NODE_SUBDIR} = $subvol_dir; $droot->{VINFO_MOUNTPOINT} = $archive_root->{VINFO_MOUNTPOINT}; + $realpath_cache{$droot->{URL}} = $droot->{PATH}; } else { # after directory is created, try to init again