Commit 9caea920 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Don't mount bs > ps without TRANSPARENT_HUGEPAGE



Large folios aren't supported without TRANSPARENT_HUGEPAGE

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 3f2f0288
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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;