bcachefs: Refactor overlapping extent checks
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 16 Jul 2023 19:12:25 +0000 (15:12 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:08 +0000 (17:10 -0400)
commita397b8df5e2f2981427f2609252f37066a0cf780
treeb926dcb48d4b81a383ed434e46e71099295eae70
parenta0076086da73297228665957c3b3bfac2492d67d
bcachefs: Refactor overlapping extent checks

Make the overlapping extent check/repair code more self contained.

This is prep work for hopefully reducing key_visible_in_snapshot() usage
here as well, and also includes a nice performance optimization to not
check ref_visible2() unless the extents potentially overlap.

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