Skip to contentSkip to conversation

bcachefs: add missing selection of XARRAY_MULTI

PATCH In review Eric Biggers 2 participants 2 messages Apr 2, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcachefs: add missing selection of XARRAY_MULTI

From: Eric Biggers <[email protected]>

When CONFIG_XARRAY_MULTI is not set, reading from a bcachefs file hits the 'BUG_ON(order > 0);' in xas_set_order(), because it tries to insert a large folio in the page cache. Fix this by making bcachefs select XARRAY_MULTI.

Fixes be212d86b19c ("bcachefs: bs > ps support")

---

I'm not entirely sure this is the correct fix; if it's not, please treat this as a bug report...

 fs/bcachefs/Kconfig | 1 +
 1 file changed, 1 insertion(+)
fs/bcachefs/Kconfig +1 -0
index c9798750202d3..bf1c94e51dd06 100644
@@ -24,10 +24,11 @@ config BCACHEFS_FS
 	select XOR_BLOCKS
 	select XXHASH
 	select SRCU
 	select SYMBOLIC_ERRNAME
 	select MIN_HEAP
+	select XARRAY_MULTI
 	help
 	The bcachefs filesystem - a modern, copy on write filesystem, with
 	support for multiple devices, compression, checksumming, etc.
 
 config BCACHEFS_QUOTA

base-commit: 88eeda35f19bab3a247ca25d99bc82ac710bc09f

Signature · 1 line
2.49.0
#1 lore raw
Quoted 7 lines · Eric Biggers

From: Eric Biggers <[email protected]>

When CONFIG_XARRAY_MULTI is not set, reading from a bcachefs file hits the 'BUG_ON(order > 0);' in xas_set_order(), because it tries to insert a large folio in the page cache. Fix this by making bcachefs select XARRAY_MULTI.

Quoted 6 lines
Fixes be212d86b19c ("bcachefs: bs > ps support")

---

I'm not entirely sure this is the correct fix; if it's not, please treat this as a bug report...

Seems reasonable - if there's a better way to do that, we can do that as a cleanup later, I'm applying it and queueing it up for the next pull request.

Quoted 25 lines
 fs/bcachefs/Kconfig | 1 +
 1 file changed, 1 insertion(+)
fs/bcachefs/Kconfig +1 -0
index c9798750202d3..bf1c94e51dd06 100644
@@ -24,10 +24,11 @@ config BCACHEFS_FS
 	select XOR_BLOCKS
 	select XXHASH
 	select SRCU
 	select SYMBOLIC_ERRNAME
 	select MIN_HEAP
+	select XARRAY_MULTI
 	help
 	The bcachefs filesystem - a modern, copy on write filesystem, with
 	support for multiple devices, compression, checksumming, etc.
 
 config BCACHEFS_QUOTA

base-commit: 88eeda35f19bab3a247ca25d99bc82ac710bc09f

Signature · 1 line
2.49.0