]> www.infradead.org Git - users/hch/dma-mapping.git/commit
bcachefs: Workaround for kvmalloc() not supporting > INT_MAX allocations
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 19 Oct 2024 22:27:09 +0000 (18:27 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 20 Oct 2024 20:50:14 +0000 (16:50 -0400)
commitf0d3302073e60b55318c941cd10b225a3cde9d32
tree506b94002e8908240c909c9b2e4a1a0c1ba1557f
parent3956ff8bc2f39a7e77d7a6da8d95c7ffc4928d64
bcachefs: Workaround for kvmalloc() not supporting > INT_MAX allocations

kvmalloc() doesn't support allocations > INT_MAX, but vmalloc() does -
the limit should be lifted, but we can work around this for now.

A user with a 75 TB filesystem reported the following journal replay
error:
https://github.com/koverstreet/bcachefs/issues/769

In journal replay we have to sort and dedup all the keys from the
journal, which means we need a large contiguous allocation. Given that
the user has 128GB of ram, the 2GB limit on allocation size has become
far too small.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/darray.c