bcachefs: RESERVE_stripe
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 2 Mar 2023 06:54:17 +0000 (01:54 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:55 +0000 (17:09 -0400)
commite84face6f0c9512d896eb1bf6c8238ea2fa7edd0
tree802f0dde21c3311cf7a0245f379e0f1d2450bc29
parentd57c9add59b187a6fcd76cb80d60f36234ca8033
bcachefs: RESERVE_stripe

Rework stripe creation path - new algorithm for deciding when to create
new stripes or reuse existing stripes.

We add a new allocation watermark, RESERVE_stripe, above RESERVE_none.
Then we always try to create a new stripe by doing RESERVE_stripe
allocations; if this fails, we reuse an existing stripe and allocate
buckets for it with the reserve watermark for the given write
(RESERVE_none or RESERVE_movinggc).

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.h
fs/bcachefs/alloc_types.h
fs/bcachefs/buckets.h
fs/bcachefs/ec.c
fs/bcachefs/errcode.h