From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 5/5] btrfs: introduce rescue=all
Date: Fri, 25 Sep 2020 08:51:40 +0800 [thread overview]
Message-ID: <abceb261-14c0-1726-a0bf-c6821ea34c3a@gmx.com> (raw)
In-Reply-To: <2377349868151ecd4be5f7077d22220793492f58.1600961206.git.josef@toxicpanda.com>
[-- Attachment #1.1: Type: text/plain, Size: 1780 bytes --]
On 2020/9/24 下午11:32, Josef Bacik wrote:
> Now that we have the building blocks for some better recovery options
> with corrupted file systems, add a rescue=all option to enable all of
> the relevant rescue options. This will allow distro's to simply default
> to rescue=all for the "oh dear lord the world's on fire" recovery
> without needing to know all the different options that we have and may
> add in the future.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> fs/btrfs/super.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 2282f0240c1d..3412763a9a0d 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -362,6 +362,7 @@ enum {
> Opt_nologreplay,
> Opt_ignorebadroots,
> Opt_ignoredatacsums,
> + Opt_all,
>
> /* Deprecated options */
> Opt_recovery,
> @@ -459,6 +460,7 @@ static const match_table_t rescue_tokens = {
> {Opt_nologreplay, "nologreplay"},
> {Opt_ignorebadroots, "ignorebadroots"},
> {Opt_ignoredatacsums, "ignoredatacsums"},
> + {Opt_all, "all"},
> {Opt_err, NULL},
> };
>
> @@ -510,6 +512,12 @@ static int parse_rescue_options(struct btrfs_fs_info *info, const char *options)
> btrfs_set_and_info(info, IGNOREDATACSUMS,
> "ignoring data csums");
> break;
> + case Opt_all:
> + btrfs_set_opt(info->mount_opt, IGNOREDATACSUMS);
> + btrfs_set_opt(info->mount_opt, IGNOREBADROOTS);
> + btrfs_set_opt(info->mount_opt, NOLOGREPLAY);
> + btrfs_info(info, "enabling all of the rescue options");
> + break;
> case Opt_err:
> btrfs_info(info, "unrecognized rescue option '%s'", p);
> ret = -EINVAL;
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-09-25 0:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-24 15:32 [PATCH 0/5] New rescue mount options Josef Bacik
2020-09-24 15:32 ` [PATCH 1/5] btrfs: unify the ro checking for " Josef Bacik
2020-09-25 0:36 ` Qu Wenruo
2020-09-28 12:37 ` Johannes Thumshirn
2020-09-28 18:23 ` Josef Bacik
2020-09-29 6:36 ` Johannes Thumshirn
2020-09-24 15:32 ` [PATCH 2/5] btrfs: push the NODATASUM check into btrfs_lookup_bio_sums Josef Bacik
2020-09-25 0:39 ` Qu Wenruo
2020-09-28 18:28 ` Josef Bacik
2020-09-28 12:39 ` Johannes Thumshirn
2020-09-24 15:32 ` [PATCH 3/5] btrfs: introduce rescue=ignorebadroots Josef Bacik
2020-09-25 0:47 ` Qu Wenruo
2020-09-28 18:24 ` Josef Bacik
2020-09-24 15:32 ` [PATCH 4/5] btrfs: introduce rescue=ignoredatacsums Josef Bacik
2020-09-25 0:50 ` Qu Wenruo
2020-09-24 15:32 ` [PATCH 5/5] btrfs: introduce rescue=all Josef Bacik
2020-09-25 0:51 ` Qu Wenruo [this message]
2020-09-25 0:34 ` [PATCH 0/5] New rescue mount options Qu Wenruo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=abceb261-14c0-1726-a0bf-c6821ea34c3a@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox