bcachefs: allocate_dropping_locks()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 28 May 2023 07:44:38 +0000 (03:44 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:03 +0000 (17:10 -0400)
commitd95dd378c207ddec7551cce2e047e6067c3c27ab
tree559134f6a725b13cff6de65a4ddc859213247c98
parent3ebfc8fe95c5ec560d2d5c7e7bef62ebaa33a9c4
bcachefs: allocate_dropping_locks()

Add two new helpers for allocating memory with btree locks held: The
idea is to first try the allocation with GFP_NOWAIT|__GFP_NOWARN, then
if that fails - unlock, retry with GFP_KERNEL, and then call
trans_relock().

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_iter.h
fs/bcachefs/btree_key_cache.c
fs/bcachefs/ec.c