summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2026-09-06 16:33:37 +0930
committerDavid Sterba <dsterba@suse.com>2026-10-12 19:16:24 +0200
commitc73eb6f727414a0a78ee993eccd6c2d2065e9571 (patch)
tree9ac1c394e007314f813d2e2aa1ca2d8d65dc7ac2 /tools/perf/scripts/python
parentd00b85308abee300dfb7e1ac642f38bab9ec7492 (diff)
downloadlinux-c73eb6f727414a0a78ee993eccd6c2d2065e9571.tar.gz
linux-c73eb6f727414a0a78ee993eccd6c2d2065e9571.zip
btrfs: always use the second newest slot for rescue=usebackuproot
[RESCUE FAILURE] There is a bug report that "rescue=usebackuproot" failed to properly mount the fs, but if using btrfs-mod-sb to use the second newest slot, then the fs can even pass the full "btrfs check" and be mounted RW. [CAUSE] During init_tree_roots(), "rescue=usebackuproot" only makes a difference if the tree and chunk roots failed to be load. The loading only requires the root node/leaf to be properly loaded: - tree root - extent tree - block group tree - device tree - data reloc tree - quota tree (optional) - uuid tree - raid stripe tree (for RST feature) And it doesn't really check any child tree blocks, thus for a lot of cases, "rescue=usebackuproot" won't make a difference. [ENHANCEMENT] Instead of trying every slot and settling down on the first passing backup slot, always use the second newest slot. The newest slot should always match the root info in the super block, and if it worked the end user should not even need to bother to use backup root. Older backup slots normally have a very low chance to work. Link: https://github.com/kdave/btrfs-progs/issues/1162#issuecomment-5475477108 Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions