diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-02 12:37:36 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-21 20:14:45 -0400 |
| commit | e9756dd29f33ede1a595d9fb5e0e2586f7542c1f (patch) | |
| tree | d941c2b4acd8a3bdac663cc77e81aba5263b5ee3 /fs/bcachefs/snapshot_format.h | |
| parent | 08d14d90a42a96f409ef3bb1fd073ca0a6bace27 (diff) | |
| download | linux-next-e9756dd29f33ede1a595d9fb5e0e2586f7542c1f.tar.gz linux-next-e9756dd29f33ede1a595d9fb5e0e2586f7542c1f.zip | |
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>
Diffstat (limited to 'fs/bcachefs/snapshot_format.h')
| -rw-r--r-- | fs/bcachefs/snapshot_format.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/snapshot_format.h b/fs/bcachefs/snapshot_format.h index 685a9fe209ab..9bccae1f3590 100644 --- a/fs/bcachefs/snapshot_format.h +++ b/fs/bcachefs/snapshot_format.h @@ -16,9 +16,9 @@ struct bch_snapshot { }; LE32_BITMASK(BCH_SNAPSHOT_WILL_DELETE, struct bch_snapshot, flags, 0, 1) - /* True if a subvolume points to this snapshot node: */ LE32_BITMASK(BCH_SNAPSHOT_SUBVOL, struct bch_snapshot, flags, 1, 2) +LE32_BITMASK(BCH_SNAPSHOT_DELETED, struct bch_snapshot, flags, 2, 3) /* * Snapshot trees: |
