done
}
-# Check if subvol $1 is different than its btrbk parent subvol, delete it if not.
+# Usage: dedupe-btrbk SUBVOL_PATH
+#
+# Check if subvol at SUBVOL_PATH is a duplicate of its btrbk parent subvol, and delete if so.
#
# Silently give up if $1 is not a child of a btrbk subvol.
#
-# Input vars: $root_dir (from get-btrfs-root-mountpoint)
+# Input vars: $vol $root_dir (from get-btrfs-root-mounts)
dedupe-btrbk() {
local parentid subvol parent_sub i lines tmpstr
local -a bsubs
fi
done
if [[ ! $parent_sub ]]; then
- d "Warning: failed to find parent of subvol=$subvol in dir: $root_dir/btrbk"
+ # This is expected to happen often. The parent gets expired.
+ # d "Warning: failed to find parent of subvol=$subvol in dir: $root_dir/btrbk"
return 0
fi
# in testing, same subvol is 136 bytes. allow some overhead. 32 happens sometimes under systemd.