bcachefs: Scan for old btree nodes if necessary on mount
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 22 Mar 2021 22:39:16 +0000 (18:39 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:54 +0000 (17:08 -0400)
commita4805d6672aac04784af132f0e11ac1dfb208079
treee91215cb4b170d3a2f0620ef1f15f1a7476925aa
parent1889ad5a1285ba452f6a8cef3df663087611050a
bcachefs: Scan for old btree nodes if necessary on mount

We dropped support for !BTREE_NODE_NEW_EXTENT_OVERWRITE but it turned
out there were people who still had filesystems with btree nodes in that
format in the wild. This adds a new compat feature that indicates we've
scanned for and rewritten nodes in the old format, and does that scan at
mount time if the option isn't set.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs_format.h
fs/bcachefs/btree_gc.c
fs/bcachefs/move.c
fs/bcachefs/move.h
fs/bcachefs/rebalance.c
fs/bcachefs/recovery.c