diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-12-20 05:20:01 -0500 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-01-09 23:38:41 -0500 |
| commit | 45414083913f68cb7586924767a3fb2cc7710352 (patch) | |
| tree | 14dd72e9c987132e8a250eac8e79ba124d659d47 /fs/bcachefs/buckets.c | |
| parent | bcachefs: Fix assert for online fsck (diff) | |
| download | linux-45414083913f68cb7586924767a3fb2cc7710352.tar.gz linux-45414083913f68cb7586924767a3fb2cc7710352.zip | |
bcachefs: bch2_kvmalloc()
Add a version of kvmalloc() that doesn't have the INT_MAX limit; large
filesystems do hit this.
We'll want to get rid of the in-memory bucket gens array, but we're not
there quite yet.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/buckets.c')
| -rw-r--r-- | fs/bcachefs/buckets.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 56d3e3800a89..345b117a4a4a 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -1258,7 +1258,7 @@ int bch2_buckets_nouse_alloc(struct bch_fs *c) for_each_member_device(c, ca) { BUG_ON(ca->buckets_nouse); - ca->buckets_nouse = kvmalloc(BITS_TO_LONGS(ca->mi.nbuckets) * + ca->buckets_nouse = bch2_kvmalloc(BITS_TO_LONGS(ca->mi.nbuckets) * sizeof(unsigned long), GFP_KERNEL|__GFP_ZERO); if (!ca->buckets_nouse) { @@ -1290,8 +1290,8 @@ int bch2_dev_buckets_resize(struct bch_fs *c, struct bch_dev *ca, u64 nbuckets) if (resize && ca->buckets_nouse) return -BCH_ERR_no_resize_with_buckets_nouse; - bucket_gens = kvmalloc(struct_size(bucket_gens, b, nbuckets), - GFP_KERNEL|__GFP_ZERO); + bucket_gens = bch2_kvmalloc(struct_size(bucket_gens, b, nbuckets), + GFP_KERNEL|__GFP_ZERO); if (!bucket_gens) { ret = -BCH_ERR_ENOMEM_bucket_gens; goto err; |
