From: Anand Jain <anand.jain@oracle.com>
To: Chris Murphy <lists@colorremedies.com>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: confusing behavior when supers mismatch
Date: Mon, 11 Mar 2019 22:38:27 +0800 [thread overview]
Message-ID: <10ca6f3a-d6df-96ad-2136-2827424d6e10@oracle.com> (raw)
In-Reply-To: <CAJCQCtQ9nduarOggGv98Oxo6SE9QBKhm7oxYXFE9UsMbVTnwow@mail.gmail.com>
On 3/11/19 7:09 AM, Chris Murphy wrote:
> In the case where superblock 0 at 65536 is valid but stale (older than
> the others):
>
> 1. btrfs check doesn't complain, the stale super is used for the check
> 2. when mounting, super 0 is used, no complaints at mount time, fairly
> quickly the newer supers are overwritten
More or less all these were hardened in the patchset [1] which is in
the mailing-list.
[PATCH v4 0/7] Superblock read and verify cleanups
Thanks, Anand
> Is this expected? In particular, in lieu of `btrfs rescue super`
> behavior which considers super 0 a bad super, and offers to fix it
> from the newer ones, and when I answer y, it replaces super 0 with
> newer information from the other supers.
>
> I think the `btrfs rescue` behavior is correct. I would expect that
> all the supers are read at mount time, and if there's discrepancy that
> either there's code to suspiciously sanity check the latest roots in
> the newest super, or it flat out fails to mount. Mounting based on
> stale super data seems risky doesn't it?
>
prev parent reply other threads:[~2019-03-11 14:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-10 23:09 confusing behavior when supers mismatch Chris Murphy
2019-03-10 23:18 ` Chris Murphy
2019-03-11 1:17 ` Qu Wenruo
2019-03-11 3:20 ` Chris Murphy
2019-03-11 4:58 ` Qu Wenruo
2019-03-11 5:19 ` Chris Murphy
2019-03-11 12:26 ` Nikolay Borisov
2019-03-11 12:35 ` Qu Wenruo
2019-03-11 12:37 ` Nikolay Borisov
2019-03-11 13:27 ` Qu Wenruo
2019-03-11 14:38 ` Anand Jain [this message]
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=10ca6f3a-d6df-96ad-2136-2827424d6e10@oracle.com \
--to=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
/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;
as well as URLs for NNTP newsgroup(s).