summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/alloc_foreground.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-11-23 17:56:14 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-11-24 00:29:58 -0500
commit6201d91ee32cf92e9bcca69a3cf73461827b5ce5 (patch)
tree495e1ae181ae32e8f5fb857e7cac454eeed4d079 /fs/bcachefs/alloc_foreground.c
parentd4e3b928ab487a8aecd1f6a140b40ac365116cfb (diff)
downloadlinux-6201d91ee32cf92e9bcca69a3cf73461827b5ce5.tar.gz
linux-6201d91ee32cf92e9bcca69a3cf73461827b5ce5.tar.bz2
linux-6201d91ee32cf92e9bcca69a3cf73461827b5ce5.zip
bcachefs: Put erasure coding behind an EXPERIMENTAL kconfig option
We still have disk space accounting changes coming for erasure coding, and the changes won't be as strictly backwards compatible as they'd ought to be - specifically, we need to start accounting striped data under a separate counter in bch_alloc (which describes buckets). A fsck will suffice for upgrading/downgrading, but since erasure coding is the most incomplete major feature of bcachefs it still makes sense to put behind a separate kconfig option, so that users are fully aware. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.c')
-rw-r--r--fs/bcachefs/alloc_foreground.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c
index b85c7765272f..5042858719c0 100644
--- a/fs/bcachefs/alloc_foreground.c
+++ b/fs/bcachefs/alloc_foreground.c
@@ -1321,6 +1321,9 @@ int bch2_alloc_sectors_start_trans(struct btree_trans *trans,
int ret;
int i;
+ if (!IS_ENABLED(CONFIG_BCACHEFS_ERASURE_CODING))
+ erasure_code = false;
+
BUG_ON(flags & BCH_WRITE_ONLY_SPECIFIED_DEVS);
BUG_ON(!nr_replicas || !nr_replicas_required);