linux-bcachefs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] generic/103: increase reserved bytes for bcachefs
@ 2021-06-25  2:11 Dan Robertson
  2021-06-25  2:11 ` [PATCH 1/1] " Dan Robertson
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Robertson @ 2021-06-25  2:11 UTC (permalink / raw)
  To: linux-bcachefs; +Cc: Dan Robertson, Kent Overstreet

After some testing it seems that generic/103 fails intermittently due to
a split leaf that can be hit in fallocate. Since the bcachefs node sizes
are larger on bcachefs than some other filesystems the reserved size
needs to be bumped up a bit when FSTYP is bcachefs.

On a system that generic/103 failed semi-regularly on, I can now it
in a loop without hitting a failure.

Dan Robertson (1):
  generic/103: increase reserved bytes for bcachefs

 tests/generic/103 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] generic/103: increase reserved bytes for bcachefs
  2021-06-25  2:11 [PATCH 0/1] generic/103: increase reserved bytes for bcachefs Dan Robertson
@ 2021-06-25  2:11 ` Dan Robertson
  2021-06-25  3:05   ` Kent Overstreet
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Robertson @ 2021-06-25  2:11 UTC (permalink / raw)
  To: linux-bcachefs; +Cc: Dan Robertson, Kent Overstreet

The bcachefs btree nodes are quite large. If we only reserve 512 bytes
we hit an intermittent failure where the fallocate that is intented to
fill the available space triggers a btree node split and the exente update
is interrupted. The retry of the extent update will fail because the
new amount of available space is less than that of the request.

Signed-off-by: Dan Robertson <dan@dlrobertson.com>
---
 tests/generic/103 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/generic/103 b/tests/generic/103
index b22b0159..610f31f6 100755
--- a/tests/generic/103
+++ b/tests/generic/103
@@ -43,7 +43,15 @@ _consume_freesp()
 
 	# consume nearly all available space (leave ~512kB)
 	avail=`_get_available_space $SCRATCH_MNT`
-	filesizekb=$((avail / 1024 - 512))
+	if [ $FSTYP = "bcachefs" ]; then
+		# The bcachefs btree nodes are quite large. If the fallocate
+		# triggers a split leaf of a btree node, we'll need more
+		# than 512 kept in reserve.
+		reserve=1024
+	else
+		reserve=512
+	fi
+	filesizekb=$((avail / 1024 - reserve))
 	$XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] generic/103: increase reserved bytes for bcachefs
  2021-06-25  2:11 ` [PATCH 1/1] " Dan Robertson
@ 2021-06-25  3:05   ` Kent Overstreet
  0 siblings, 0 replies; 3+ messages in thread
From: Kent Overstreet @ 2021-06-25  3:05 UTC (permalink / raw)
  To: Dan Robertson; +Cc: linux-bcachefs

On Thu, Jun 24, 2021 at 10:11:18PM -0400, Dan Robertson wrote:
> The bcachefs btree nodes are quite large. If we only reserve 512 bytes
> we hit an intermittent failure where the fallocate that is intented to
> fill the available space triggers a btree node split and the exente update
> is interrupted. The retry of the extent update will fail because the
> new amount of available space is less than that of the request.
> 
> Signed-off-by: Dan Robertson <dan@dlrobertson.com>

Thanks, merged

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-25  3:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25  2:11 [PATCH 0/1] generic/103: increase reserved bytes for bcachefs Dan Robertson
2021-06-25  2:11 ` [PATCH 1/1] " Dan Robertson
2021-06-25  3:05   ` Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).