diff options
Diffstat (limited to 'system/bees')
-rw-r--r-- | system/bees/README | 26 | ||||
-rw-r--r-- | system/bees/bees.SlackBuild | 7 | ||||
-rw-r--r-- | system/bees/bees.info | 6 | ||||
-rw-r--r-- | system/bees/patches/ee5c971_fsync_fix_signed_comparison_of_stf.f_type.patch | 35 | ||||
-rw-r--r-- | system/bees/slack-desc | 8 |
5 files changed, 62 insertions, 20 deletions
diff --git a/system/bees/README b/system/bees/README index 88041ffa13..76d510e184 100644 --- a/system/bees/README +++ b/system/bees/README @@ -1,27 +1,31 @@ bees (Best-Effort Extent-Same) is a block-oriented userspace -deduplication agent designed for large btrfs filesystems. It is an -offline dedupe combined with an incremental data scan capability to -minimize time data spends on disk from write to dedupe. +deduplication agent designed to scale up to large btrfs filesystems. +It is an offline dedupe combined with an incremental data scan +capability to minimize time data spends on disk from write to dedupe. Strengths: - * Space-efficient hash table and matching algorithms - can use as - little as 1 GB hash table per 10 TB unique data (0.1GB/TB) - * Daemon incrementally dedupes new data using btrfs tree search + * Space-efficient hash table - can use as little as 1 GB hash table + per 10 TB unique data (0.1GB/TB) + * Daemon mode - incrementally dedupes new data as it appears + * Largest extents first - recover more free space during fixed + maintenance windows * Works with btrfs compression - dedupe any combination of compressed and uncompressed files - * Works around btrfs filesystem structure to free more disk space + * Whole-filesystem dedupe - scans data only once, even with snapshots + and reflinks * Persistent hash table for rapid restart after shutdown - * Whole-filesystem dedupe - including snapshots * Constant hash table size - no increased RAM usage if data set becomes larger * Works on live data - no scheduled downtime required - * Automatic self-throttling based on system load + * Automatic self-throttling - reduces system load + * btrfs support - recovers more free space from btrfs than naive + dedupers Weaknesses: * Whole-filesystem dedupe - has no include/exclude filters, does not accept file lists - * Requires root privilege (or CAP_SYS_ADMIN) - * First run may require temporary disk space for extent reorganization + * Requires root privilege (`CAP_SYS_ADMIN` plus the usual filesystem + read/modify caps) * First run may increase metadata space usage if many snapshots exist * Constant hash table size - no decreased RAM usage if data set becomes smaller diff --git a/system/bees/bees.SlackBuild b/system/bees/bees.SlackBuild index 807d885a3d..f3943ce562 100644 --- a/system/bees/bees.SlackBuild +++ b/system/bees/bees.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for bees -# Copyright 2023 Erich Ritz, Jenks, Oklahoma, USA +# Copyright 2023,2025 Erich Ritz, Jenks, Oklahoma, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=bees -VERSION=${VERSION:-0.10} +VERSION=${VERSION:-0.11} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -76,6 +76,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# https://github.com/Zygo/bees/issues/317 +patch -p1 < $CWD/patches/ee5c971_fsync_fix_signed_comparison_of_stf.f_type.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ make reallyall LIBDIR=lib$LIBDIRSUFFIX BEES_VERSION=$VERSION diff --git a/system/bees/bees.info b/system/bees/bees.info index 9757716342..7dcb09a90b 100644 --- a/system/bees/bees.info +++ b/system/bees/bees.info @@ -1,8 +1,8 @@ PRGNAM="bees" -VERSION="0.10" +VERSION="0.11" HOMEPAGE="https://zygo.github.io/bees/" -DOWNLOAD="https://github.com/Zygo/bees/archive/v0.10/bees-0.10.tar.gz" -MD5SUM="2c90623e9867c4dcda4b4ef471372da8" +DOWNLOAD="https://github.com/Zygo/bees/archive/v0.11/bees-0.11.tar.gz" +MD5SUM="1e2260d62afe9a4b5c9089b1ff779f2e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/bees/patches/ee5c971_fsync_fix_signed_comparison_of_stf.f_type.patch b/system/bees/patches/ee5c971_fsync_fix_signed_comparison_of_stf.f_type.patch new file mode 100644 index 0000000000..13f1cd739a --- /dev/null +++ b/system/bees/patches/ee5c971_fsync_fix_signed_comparison_of_stf.f_type.patch @@ -0,0 +1,35 @@ +commit ee5c971d77e04e2978484f4191e8aca1160991a0 +Author: Zygo Blaxell <bees@furryterror.org> +Date: Thu Jul 3 21:48:40 2025 -0400 + + fsync: fix signed comparison of stf.f_type + + Build fails on 32-bit Slackware because GCC 11's `-Werror=sign-compare` + is stricter than necessary: + + cc -Wall -Wextra -Werror -O3 -I../include -D_FILE_OFFSET_BITS=64 -std=c99 -O2 -march=i586 -mtune=i686 -o bees-version.o -c bees-version.c + bees.cc: In function 'void bees_fsync(int)': + bees.cc:426:24: error: comparison of integer expressions of different signedness: '__fsword_t' {aka 'int'} and 'unsigned int' [-Werror=sign-compare] + 426 | if (stf.f_type != BTRFS_SUPER_MAGIC) { + | ^ + + To work around this, cast `stf.f_type` to the same type as + `BTRFS_SUPER_MAGIC`, so it has the same number of bits that we're looking + for in the magic value. + + Fixes: https://github.com/Zygo/bees/issues/317 + Signed-off-by: Zygo Blaxell <bees@furryterror.org> + +diff --git a/src/bees.cc b/src/bees.cc +index 80523a5..1130bed 100644 +--- a/src/bees.cc ++++ b/src/bees.cc +@@ -423,7 +423,7 @@ bees_fsync(int const fd) + // can fill in the f_type field. + struct statfs stf = { 0 }; + DIE_IF_NON_ZERO(fstatfs(fd, &stf)); +- if (stf.f_type != BTRFS_SUPER_MAGIC) { ++ if (static_cast<decltype(BTRFS_SUPER_MAGIC)>(stf.f_type) != BTRFS_SUPER_MAGIC) { + BEESLOGONCE("Using fsync on non-btrfs filesystem type " << to_hex(stf.f_type)); + BEESNOTE("fsync non-btrfs " << name_fd(fd)); + DIE_IF_NON_ZERO(fsync(fd)); diff --git a/system/bees/slack-desc b/system/bees/slack-desc index 47e2e82afe..2aa8f7c53d 100644 --- a/system/bees/slack-desc +++ b/system/bees/slack-desc @@ -8,10 +8,10 @@ |-----handy-ruler------------------------------------------------------| bees: bees (Best-Effort Extent-Same) bees: -bees: bees is a block-oriented userspace deduplication agent designed for -bees: large btrfs filesystems. It is an offline dedupe combined with an -bees: incremental data scan capability to minimize time data spends on disk -bees: from write to dedupe. +bees: bees is a block-oriented userspace deduplication agent designed to +bees: scale up to large btrfs filesystems. It is an offline dedupe combined +bees: with an incremental data scan capability to minimize time data spends +bees: on disk from write to dedupe. bees: bees: Homepage: https://zygo.github.io/bees/ bees: |