bcachefs: Improve fsck for subvols/snapshots

- Bunch of refactoring, and move some code out of
   bch2_snapshots_start() and into bch2_snapshots_check(), for constency
   with the rest of fsck

 - Interior snapshot nodes no longer point to a subvolume; this is so we
   don't end up with dangling subvol references when deleting or require
   scanning the full snapshots btree.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2022-07-14 05:44:10 -04:00 • committed by Kent Overstreet
commit 35f1a5034d
2 changed files with 131 additions and 102 deletions