bcachefs: Don't read existing stripes synchronously in write path
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 15 Dec 2020 00:41:03 +0000 (19:41 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:50 +0000 (17:08 -0400)
commit81d8599e192e85fa7e01d8a6e8e4095177ff46a3
tree02dadb2c9c063c69ffe931aa6a0d2f4c8f0111e0
parent35a067b42dcfd884fb132128ae94f240c6511fea
bcachefs: Don't read existing stripes synchronously in write path

Previously, in the stripe creation path, when reusing an existing stripe
we'd read the existing stripe synchronously - ouch.

Now, we allocate two stripe bufs if we're using an existing stripe, so
that we can do the read asynchronously - and, we read the full stripe so
that we can run recovery, if necessary.

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