OSDN Git Service

btrfs: introduce mount option rescue=ignorebadroots
authorJosef Bacik <josef@toxicpanda.com>
Fri, 16 Oct 2020 15:29:18 +0000 (11:29 -0400)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:53:41 +0000 (15:53 +0100)
commit42437a6386ffeaaf200731e73d723ea491f3fe7d
treed8c5d6ebb854ecdb34e61fe7d9f458656e1713f1
parent68319c18cb21ab472ce2c4ed572257a42455ac01
btrfs: introduce mount option rescue=ignorebadroots

In the face of extent root corruption, or any other core fs wide root
corruption we will fail to mount the file system.  This makes recovery
kind of a pain, because you need to fall back to userspace tools to
scrape off data.  Instead provide a mechanism to gracefully handle bad
roots, so we can at least mount read-only and possibly recover data from
the file system.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/block-rsv.c
fs/btrfs/compression.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/file-item.c
fs/btrfs/inode.c
fs/btrfs/super.c
fs/btrfs/sysfs.c
fs/btrfs/volumes.c