diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-10 17:33:31 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-16 19:47:39 -0500 |
commit | ff070f50954f6e7adb6d53ebe3ea578260ba3feb (patch) | |
tree | 9394a8f7367de699349b902786e7af47bc28d3d2 | |
parent | 8fd593553704b80bed4d4917738fc12e0a608011 (diff) |
generic/275: Reserve more space on bcachefs
bcachefs btree nodes default to 256k, therefore we need to reserve more
than 256k of space to ensure we can write.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rwxr-xr-x | tests/generic/275 | 12 |
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 |