bcachefs: bcachefs_metadata_version_snapshot_deletion_v2
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 2 May 2025 16:37:36 +0000 (12:37 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 22 May 2025 00:14:45 +0000 (20:14 -0400)
commite9756dd29f33ede1a595d9fb5e0e2586f7542c1f
treed941c2b4acd8a3bdac663cc77e81aba5263b5ee3
parent08d14d90a42a96f409ef3bb1fd073ca0a6bace27
bcachefs: bcachefs_metadata_version_snapshot_deletion_v2

We're going to be speeding up snapshot deletion, by only having it
process the extents/dirents/xattrs btrees if an inode of a given
snapshot ID was present.

This raises the possibility of 'bkey_in_missing_snapshot' errors popping
up, if we ever accidentally don't do the corresponding inode update, or
if the new algorithm has bugs.

So instead of deleting snapshot IDs, add a new deleted flag, so that
'key in missing snapshot' errors can more definitively tell what
happened and automatically repair.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs_format.h
fs/bcachefs/snapshot.c
fs/bcachefs/snapshot.h
fs/bcachefs/snapshot_format.h
fs/bcachefs/snapshot_types.h
fs/bcachefs/subvolume_types.h