bcachefs: Only try to get existing stripe once in stripe create path
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 9 Dec 2020 18:39:30 +0000 (13:39 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:49 +0000 (17:08 -0400)
commit66bddc6c2b389a65708c27e7e7a9969e645ca799
treed3a519fe9dbbbfa52f4d330d8125159e71988577
parentcc578a36f9953c32a8ba866ee1878fcbb99a9746
bcachefs: Only try to get existing stripe once in stripe create path

The stripe creation path was too state-machiney: it would always run the
full state machine until it had succesfully created a new stripe.

But if we tried to get and reuse an existing stripe after we'd already
allocated some buckets, the buckets we'd allocated might have conflicted
with the blocks in the existing stripe we need to keep - oops.

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