Skip to content

Commit 9caea92

Browse files
author
Kent Overstreet
committed
bcachefs: Don't mount bs > ps without TRANSPARENT_HUGEPAGE
Large folios aren't supported without TRANSPARENT_HUGEPAGE Signed-off-by: Kent Overstreet <[email protected]>
1 parent 3f2f028 commit 9caea92

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fs/bcachefs/super.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,13 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts *opts,
950950

951951
bch2_opts_apply(&c->opts, *opts);
952952

953+
if (!IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) &&
954+
c->opts.block_size > PAGE_SIZE) {
955+
bch_err(c, "cannot mount bs > ps filesystem without CONFIG_TRANSPARENT_HUGEPAGE");
956+
ret = -EINVAL;
957+
goto err;
958+
}
959+
953960
c->btree_key_cache_btrees |= 1U << BTREE_ID_alloc;
954961
if (c->opts.inodes_use_key_cache)
955962
c->btree_key_cache_btrees |= 1U << BTREE_ID_inodes;

0 commit comments

Comments
 (0)