diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-23 21:59:12 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-23 22:00:07 -0400 |
commit | 9caea9208fc3fbdbd4a41a2de8c6a0c969b030f9 (patch) | |
tree | a8a663332bc49ffbd674bee2aea0bdb4c16f4dee | |
parent | 3f2f028814abf68ce4d74bfd2627cb84d2afa389 (diff) |
bcachefs: Don't mount bs > ps without TRANSPARENT_HUGEPAGEbcachefs-2025-05-24
Large folios aren't supported without TRANSPARENT_HUGEPAGE
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/super.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 24658bf450ab..11579b74c640 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -950,6 +950,13 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts *opts, bch2_opts_apply(&c->opts, *opts); + if (!IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) && + c->opts.block_size > PAGE_SIZE) { + bch_err(c, "cannot mount bs > ps filesystem without CONFIG_TRANSPARENT_HUGEPAGE"); + ret = -EINVAL; + goto err; + } + c->btree_key_cache_btrees |= 1U << BTREE_ID_alloc; if (c->opts.inodes_use_key_cache) c->btree_key_cache_btrees |= 1U << BTREE_ID_inodes; |