]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: bcachefs_metadata_version_backpointer_bucket_gen
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 17 Nov 2024 04:53:07 +0000 (23:53 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 29 Dec 2024 18:30:39 +0000 (13:30 -0500)
commitebdca072683844e04fe8bd31f64745554b9119d4
tree55a92e5ee5286c8a618119e47d7ea59c89852351
parent6679e363f44121ec07e9daeb0c78464df410bc47
bcachefs: bcachefs_metadata_version_backpointer_bucket_gen

New on disk format version: backpointers new include the generation
number of the bucket they refer to, and the obsolete bucket_offset field
(no longer needed because we no longer store backpointers in alloc keys)
is gone.

This is an expensive forced upgrade - hopefully the last; we have to run
the extents_to_backpointers recovery pass to regenerate backpointers.

It's a forced incompatible upgrade because the alternative would've been
permamently making backpointers bigger, and as one of the biggest btrees
(along with the extents btree) that's not an ideal option.

It's worth it though, because this allows us to make the
check_extents_to_backpointers pass drastically cheaper: an upcoming
patch changes it to sum up backpointers in a bucket and check the sum
against the sector counts for that bucket, only looking for missing
backpointers if they don't match (and then only for specific buckets).

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/backpointers.c
fs/bcachefs/backpointers.h
fs/bcachefs/bcachefs_format.h
fs/bcachefs/sb-downgrade.c