bcachefs: Fix dev accounting after device add
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 24 Oct 2021 15:57:47 +0000 (11:57 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:14 +0000 (17:09 -0400)
commit114eea75c73dfd95ae529eb841aad0330793f446
treeb46844a61fe38a422c689d8e9094b2f2e59db8ee
parentab44d7bdeebe316a03f37c08c1f66c13ea9aa5d5
bcachefs: Fix dev accounting after device add

This is a hacky but effective fix to device usage stats for superblock
and journal being wrong on a newly added device (following the comment
that already told us how it needed to be done!)

Reported-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/super.c