format: fix minimum bucket nr check
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix-Tests / nix-flake-check (push) Waiting to run

This commit is contained in:
Kent Overstreet 2025-03-25 16:47:50 -04:00
parent 941dfd7a29
commit 2160e9a7bd

View File

@ -64,7 +64,7 @@ void bch2_sb_layout_init(struct bch_sb_layout *l,
static u64 dev_max_bucket_size(u64 dev_size)
{
return dev_size / BCH_MIN_NR_NBUCKETS;
return rounddown_pow_of_two(dev_size / (BCH_MIN_NR_NBUCKETS * 4));
}
u64 bch2_pick_bucket_size(struct bch_opts opts, dev_opts_list devs)