diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-10-16 11:29:18 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-12-08 15:53:41 +0100 |
commit | 42437a6386ffeaaf200731e73d723ea491f3fe7d (patch) | |
tree | d8c5d6ebb854ecdb34e61fe7d9f458656e1713f1 /fs/btrfs/sysfs.c | |
parent | 68319c18cb21ab472ce2c4ed572257a42455ac01 (diff) | |
download | linux-42437a6386ffeaaf200731e73d723ea491f3fe7d.tar.gz linux-42437a6386ffeaaf200731e73d723ea491f3fe7d.tar.bz2 linux-42437a6386ffeaaf200731e73d723ea491f3fe7d.zip |
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>
Diffstat (limited to 'fs/btrfs/sysfs.c')
-rw-r--r-- | fs/btrfs/sysfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 8f0462d6855d..e9f482989415 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -332,6 +332,7 @@ BTRFS_ATTR(static_feature, send_stream_version, send_stream_version_show); static const char *rescue_opts[] = { "usebackuproot", "nologreplay", + "ignorebadroots", }; static ssize_t supported_rescue_options_show(struct kobject *kobj, |