]> git.hungrycats.org Git - bees/commit
hash: handle $BEESHOME on non-btrfs
authorZygo Blaxell <bees@furryterror.org>
Mon, 27 Jan 2025 02:59:07 +0000 (21:59 -0500)
committerZygo Blaxell <bees@furryterror.org>
Fri, 7 Feb 2025 03:42:15 +0000 (22:42 -0500)
commitf6908420adcf3fbafef8bbde8a25f8bac65424b6
tree78278bc0f1cad1017be141c1c24f740542bb916e
parent925b12823ec6c1d537ab2844fb72c08a3f64a014
hash: handle $BEESHOME on non-btrfs

bees explicitly supports storing $BEESHOME on another filesystem, and
does not require that filesystem to be btrfs; however, if $BEESHOME
is on a non-btrfs filesystem, there is an exception on every startup
when trying to identify the subvol root of the hash table file in order
to blacklist it, because non-btrfs filesystems don't have subvol roots.

Fix by checking not only whether $BEESHOME is on btrfs, but whether it
is on the _same_ btrfs, as the bees root, without throwing an exception.
The hash table is blacklisted only when both filesystems are btrfs and
have the same fsid.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees-hash.cc