summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-06-19 09:20:35 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-11 19:28:36 -0400
commitfb076e633ca2777c49cc59588f677a74f5abc1e1 (patch)
treedb8e73fb505a836a81607ecadfdfc4967ffa8704
parentf91b7b3aee1f60e9e8b6fae31c98020d882d5113 (diff)
generic/674: allow size to grow after dedup once
bcachefs has to allocate the reflink btree on first use, and btree nodes are 256k by default. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rwxr-xr-xtests/generic/6748
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/generic/674 b/tests/generic/674
index 2ed022df..d26b4dff 100755
--- a/tests/generic/674
+++ b/tests/generic/674
@@ -34,6 +34,8 @@ setup_testfile() {
sync
}
+nr_grows=0
+
commit_and_check() {
local user="$1"
@@ -57,7 +59,11 @@ commit_and_check() {
echo "before: $before_freesp; after: $after_freesp" >> $seqres.full
if [ $after_freesp -le $before_freesp ]; then
- echo "expected more free space after dedupe"
+ # allow free space to grow after dedup once; bcachefs has to allocate the reflink btree
+ if [ $nr_grows -gt 0 ]; then
+ echo "expected more free space after dedupe"
+ fi
+ nr_grows=$(( nr_grows + 1 ))
fi
# Blank line in output