From: Ian Kelling Date: Thu, 3 Oct 2024 11:18:15 +0000 (-0400) Subject: minor docs fix X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=8eebd8ecda4e1ad18b52ae2349c6472083891a1e;p=distro-setup minor docs fix --- diff --git a/filesystem/usr/local/bin/mount-latest-subvol b/filesystem/usr/local/bin/mount-latest-subvol index 602ca52..376b0d8 100755 --- a/filesystem/usr/local/bin/mount-latest-subvol +++ b/filesystem/usr/local/bin/mount-latest-subvol @@ -183,11 +183,13 @@ expire-leaf-vols() { 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 @@ -202,7 +204,8 @@ dedupe-btrbk() { 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.