bcachefs: Run check_extents_to_backpointers() in multiple passes
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 28 Sep 2022 14:06:10 +0000 (10:06 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:51 +0000 (17:09 -0400)
commitb32f9a577b8d532d31ee7d71e58d1ec512a25a9a
tree66c3166bd72e872edb9903186726d069fa8c03f3
parent23792a712d29ee8adc6f5c165e61e8624838169d
bcachefs: Run check_extents_to_backpointers() in multiple passes

Similer to the previous patch for check_backpointers_to_extents(), if
the alloc + backpointers btrees do not fit in ram we need to run into
multiple passes.

The counting of btree nodes that fit in memory is different here,
because we have to walk the alloc and backpointers btrees at the same
time, since a backpointer could reside in either of them and we don't
know which without checking both.

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