diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-11 23:11:46 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-03 14:44:18 -0400 |
commit | 4409b8081d1624af814a9cda781ad9cdda3973cb (patch) | |
tree | 22adb020d08b6c1d257465ab7c78bbeaa19df4cf /fs/bcachefs/recovery_passes_types.h | |
parent | b268aa4e7fb8be3c50e25a09008fb2feed2cd345 (diff) | |
download | linux-4409b8081d1624af814a9cda781ad9cdda3973cb.tar.gz linux-4409b8081d1624af814a9cda781ad9cdda3973cb.tar.bz2 linux-4409b8081d1624af814a9cda781ad9cdda3973cb.zip |
bcachefs: Repair pass for scanning for btree nodes
If a btree root or interior btree node goes bad, we're going to lose a
lot of data, unless we can recover the nodes that it pointed to by
scanning.
Fortunately btree node headers are fully self describing, and
additionally the magic number is xored with the filesytem UUID, so we
can do so safely.
This implements the scanning - next patch will rework topology repair to
make use of the found nodes.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery_passes_types.h')
-rw-r--r-- | fs/bcachefs/recovery_passes_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery_passes_types.h b/fs/bcachefs/recovery_passes_types.h index f30521285706..840542cfd65b 100644 --- a/fs/bcachefs/recovery_passes_types.h +++ b/fs/bcachefs/recovery_passes_types.h @@ -13,6 +13,7 @@ * must never change: */ #define BCH_RECOVERY_PASSES() \ + x(scan_for_btree_nodes, 37, 0) \ x(check_topology, 4, 0) \ x(alloc_read, 0, PASS_ALWAYS) \ x(stripes_read, 1, PASS_ALWAYS) \ |