Skip to content

Commit 6201d91

Browse files
author
Kent Overstreet
committed
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>
1 parent d4e3b92 commit 6201d91

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

fs/bcachefs/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ config BCACHEFS_QUOTA
3333
depends on BCACHEFS_FS
3434
select QUOTACTL
3535

36+
config BCACHEFS_ERASURE_CODING
37+
bool "bcachefs erasure coding (RAID5/6) support (EXPERIMENTAL)"
38+
depends on BCACHEFS_FS
39+
select QUOTACTL
40+
help
41+
This enables the "erasure_code" filesysystem and inode option, which
42+
organizes data into reed-solomon stripes instead of ordinary
43+
replication.
44+
45+
WARNING: this feature is still undergoing on disk format changes, and
46+
should only be enabled for testing purposes.
47+
3648
config BCACHEFS_POSIX_ACL
3749
bool "bcachefs POSIX ACL support"
3850
depends on BCACHEFS_FS

fs/bcachefs/alloc_foreground.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,9 @@ int bch2_alloc_sectors_start_trans(struct btree_trans *trans,
13211321
int ret;
13221322
int i;
13231323

1324+
if (!IS_ENABLED(CONFIG_BCACHEFS_ERASURE_CODING))
1325+
erasure_code = false;
1326+
13241327
BUG_ON(flags & BCH_WRITE_ONLY_SPECIFIED_DEVS);
13251328

13261329
BUG_ON(!nr_replicas || !nr_replicas_required);

0 commit comments

Comments
 (0)