aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/super-io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-11-04 22:09:51 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:11 -0400
commit8b335baef22768deb7140e45f32f37ea51a1faf4 (patch)
tree47e503994a655cbef184189b655c1d77576e5478 /fs/bcachefs/super-io.c
parentb092dadd55fb242a480f81c421303a9e53302156 (diff)
bcachefs: Assorted fixes for running on very small devices
It's now possible to create and use a filesystem on a 512k device with 4k buckets (though at that size we still waste almost half to internal reserves) Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super-io.c')
-rw-r--r--fs/bcachefs/super-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c
index 64c2375302a0..58c35d9665eb 100644
--- a/fs/bcachefs/super-io.c
+++ b/fs/bcachefs/super-io.c
@@ -811,7 +811,7 @@ static const char *bch2_sb_validate_members(struct bch_sb *sb,
return "Too many buckets";
if (le64_to_cpu(m->nbuckets) -
- le16_to_cpu(m->first_bucket) < 1 << 10)
+ le16_to_cpu(m->first_bucket) < BCH_MIN_NR_NBUCKETS)
return "Not enough buckets";
if (le16_to_cpu(m->bucket_size) <