If latest subvols \$@ are not mounted, print a message to terminal.
-Fresh is opposite of stale. To be fresh, either SUBVOL_MOUNTPOINT is a
-snapshot of the latest, or the latest snapshot is snapshot of
-SUBVOL_MOUNTPOINT.
+Fresh is opposite of stale. To be fresh, the subvol in the root subvol
+mount, aka SUBVOL_PATH, such as /mnt/root/a, is a snapshot of the latest
+btrbk snapshot, or the latest btrbk snapshot is snapshot of SUBVOL_PATH.
-p Args are SUBVOL_PATH, not mountpoints from which we derive
that information.
exit $1
}
-##### begin command line parsing ########
-
-subvol_path=false
-verbose=false
-temp=$(getopt -l help,verbose hpv "$@") || usage 1
-eval set -- "$temp"
-while true; do
- case $1 in
- -p) subvol_path=true ;;
- -v|--verbose) verbose=true ;;
- -h|--help) usage ;;
- --) shift; break ;;
- *) echo "$0: unexpected args: $*" >&2 ; usage 1 ;;
- esac
- shift
-done
-
-if [[ ! $1 ]]; then
- echo "$0: error: expected mountpoint argument"
-fi
-
stale-file() {
stale_dir=/nocow/btrfs-stale
stale_file=$stale_dir/$vol
done
fi
}
+
+
+##### begin command line parsing ########
+
+subvol_path=false
+verbose=false
+temp=$(getopt -l help,verbose hpv "$@") || usage 1
+eval set -- "$temp"
+while true; do
+ case $1 in
+ -p) subvol_path=true ;;
+ -v|--verbose) verbose=true ;;
+ -h|--help) usage ;;
+ --) shift; break ;;
+ *) echo "$0: unexpected args: $*" >&2 ; usage 1 ;;
+ esac
+ shift
+done
+
+if [[ ! $1 ]]; then
+ echo "$0: error: expected mountpoint argument"
+fi
+
+##### end command line parsing ########
+
+
tmpf=$(mktemp)
d tmpf=$tmpf
for d; do
if $subvol_path; then
- svp=$d
+ svp=$d # svp = subvolume path
root_dir=${d%/*}
subvol_dir=${d##*/}
vol=$subvol_dir