bcachefs: check_extent(): don't use key_visible_in_snapshot()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 16 Jul 2023 18:55:33 +0000 (14:55 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:07 +0000 (17:10 -0400)
commita0076086da73297228665957c3b3bfac2492d67d
tree84232900739bec99a44febc8eb9ad47fec4eb571
parent650eb16b45183c7ea7c17e56ac862dc1ad1ec849
bcachefs: check_extent(): don't use key_visible_in_snapshot()

This changes the main part of check_extents(), that checks the extent
against the corresponding inode, to not use key_visible_in_snapshot().

key_visible_in_snapshot() has to iterate over the list of ancestor
overwrites repeatedly calling bch2_snapshot_is_ancestor(), so this is a
significant performance improvement.

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