bcachefs: Account for stripe parity sectors separately
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 9 Jul 2020 22:31:51 +0000 (18:31 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:45 +0000 (17:08 -0400)
commitaf4d05c46b1ef2b2b43e9df1924e204efe205ec6
tree5483aabecf73bbf22a0e26e54f5a2dd531551dda
parent39283c712e6df927c7c49e8b738ca110551bb399
bcachefs: Account for stripe parity sectors separately

Instead of trying to charge EC parity to the data within the stripe
(which is subject to rounding errors), let's charge it to the stripe
itself. It should also make -ENOSPC issues easier to deal with if we
charge for parity blocks up front, and means we can also make more fine
grained accounting available to the user.

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/buckets.c
fs/bcachefs/ec.c
fs/bcachefs/ec.h
fs/bcachefs/replicas.c