[PROBLEM]
There are some reports of corrupted fs which can't be mounted due to
corrupted extent tree.
However under such situation, it's more likely the fs/subvolume trees
are still fine.
For such case we normally go btrfs-restore and salvage as much as we
can. However btrfs-restore can't list subvolumes as "btrfs subv list",
making it harder to restore a fs.
[ENHANCEMENT]
This patch will introduce a new mount option "rescue=skipbg" to skip
the mount time block group scan, and use chunk info solely to populate
fake block group cache.
The mount option has the following dependency:
- RO mount
Obviously.
- No dirty log.
Either there is no log, or use rescue=nologreplay mount option.
- No way to remoutn RW
Similar to rescue=nologreplay option.
This allow kernel to accept all extent tree corruption, even when the
whole extent tree is corrupted, and allow user to salvage data and
subvolume info.
Signed-off-by: Qu Wenruo <wqu@suse.com>
ff72eba