summaryrefslogtreecommitdiff
path: root/tests/generic/275
diff options
context:
space:
mode:
Diffstat (limited to 'tests/generic/275')
-rwxr-xr-xtests/generic/27512
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/generic/275 b/tests/generic/275
index f3b05409..7cef2b50 100755
--- a/tests/generic/275
+++ b/tests/generic/275
@@ -48,7 +48,17 @@ touch $later_file
# this file will get removed to create 256k of free space after ENOSPC
# conditions are created.
-dd if=/dev/zero of=$SCRATCH_MNT/tmp1 bs=256K count=1 >>$seqres.full 2>&1
+reserve=256k
+
+if [[ $FSTYP = "bcachefs" ]]; then
+ # bcachefs btree nodes default to 256k, we need more:
+ reserve=512k
+ # ensure one truncate has been done so that the logged ops btree has been allocated:
+ dd if=/dev/zero of=$SCRATCH_MNT/tmp1 bs=$reserve count=1 >/dev/null 2>&1
+ truncate --size=0 $later_file
+fi
+
+dd if=/dev/zero of=$SCRATCH_MNT/tmp1 bs=$reserve count=1 >>$seqres.full 2>&1
[ $? -ne 0 ] && _fail "Error creating file"
# Attempt to completely fill fs