bcachefs: Fix erasure coding disk space accounting
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 7 Oct 2019 19:57:47 +0000 (15:57 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:29 +0000 (17:08 -0400)
commit43de7376f36c236255b7daf88e8286720426568b
tree57f39404fc55a0a1e8e609d7e9146816537b5d52
parent9ec211b0ff4019407d029c49099f24dfedbc4db1
bcachefs: Fix erasure coding disk space accounting

Disk space accounting for erasure coding + compression was completely
broken - we need to calculate the parity sectors delta the same way we
calculate disk_sectors, by calculating the old and new usage and
subtracting to get the difference.

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