From: Martin Steigerwald <Martin@lichtvoll.de>
To: Chris Murphy <lists@colorremedies.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: What is the vision for btrfs fs repair?
Date: Sun, 12 Oct 2014 12:14:01 +0200 [thread overview]
Message-ID: <2313804.P0rE2GFdbV@merkaba> (raw)
In-Reply-To: <93B9D2BD-1F0F-4C94-899F-16A3A2A0D57E@colorremedies.com>
Am Freitag, 10. Oktober 2014, 10:37:44 schrieb Chris Murphy:
> On Oct 10, 2014, at 6:53 AM, Bob Marley <bobmarley@shiftmail.org> wrote:
> > On 10/10/2014 03:58, Chris Murphy wrote:
> >>> * mount -o recovery
> >>>
> >>> "Enable autorecovery attempts if a bad tree root is found at mount
> >>> time."
> >>
> >> I'm confused why it's not the default yet. Maybe it's continuing to
> >> evolve at a pace that suggests something could sneak in that makes
> >> things worse? It is almost an oxymoron in that I'm manually enabling an
> >> autorecovery
> >>
> >> If true, maybe the closest indication we'd get of btrfs stablity is the
> >> default enabling of autorecovery.>
> > No way!
> > I wouldn't want a default like that.
> >
> > If you think at distributed transactions: suppose a sync was issued on
> > both sides of a distributed transaction, then power was lost on one side,
> > than btrfs had corruption. When I remount it, definitely the worst thing
> > that can happen is that it auto-rolls-back to a previous known-good
> > state.
> For a general purpose file system, losing 30 seconds (or less) of
> questionably committed data, likely corrupt, is a file system that won't
> mount without user intervention, which requires a secret decoder ring to
> get it to mount at all. And may require the use of specialized tools to
> retrieve that data in any case.
>
> The fail safe behavior is to treat the known good tree root as the default
> tree root, and bypass the bad tree root if it cannot be repaired, so that
> the volume can be mounted with default mount options (i.e. the ones in
> fstab). Otherwise it's a filesystem that isn't well suited for general
> purpose use as rootfs let alone for boot.
To understand this a bit better:
What can be the reasons a recent tree gets corrupted?
I always thought with a controller and device and driver combination that
honors fsync with BTRFS it would either be the new state of the last known
good state *anyway*. So where does the need to rollback arise from?
That said all journalling filesystems have some sort of rollback as far as I
understand: If the last journal entry is incomplete they discard it on journal
replay. So even there you use the last seconds of write activity.
But in case fsync() returns the data needs to be safe on disk. I always
thought BTRFS honors this under *any* circumstance. If some proposed
autorollback breaks this guarentee, I think something is broke elsewhere.
And fsync is an fsync is an fsync. Its semantics are clear as crystal. There
is nothing, absolutely nothing to discuss about it.
An fsync completes if the device itself reported "Yeah, I have the data on
disk, all safe and cool to go". Anything else is a bug IMO.
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
next prev parent reply other threads:[~2014-10-12 10:14 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 19:11 What is the vision for btrfs fs repair? Eric Sandeen
2014-10-09 11:29 ` Austin S Hemmelgarn
2014-10-09 11:53 ` Duncan
2014-10-09 11:55 ` Hugo Mills
2014-10-09 12:07 ` Austin S Hemmelgarn
2014-10-09 12:12 ` Hugo Mills
2014-10-09 12:32 ` Austin S Hemmelgarn
[not found] ` <107Y1p00G0wm9Bl0107vjZ>
2014-10-09 12:34 ` Duncan
2014-10-09 13:18 ` Austin S Hemmelgarn
2014-10-09 13:49 ` Duncan
2014-10-09 15:44 ` Eric Sandeen
[not found] ` <0zvr1p0162Q6ekd01zvtN0>
2014-10-09 12:42 ` Duncan
2014-10-10 1:58 ` Chris Murphy
2014-10-10 3:20 ` Duncan
2014-10-10 10:53 ` Bob Marley
2014-10-10 10:59 ` Roman Mamedov
2014-10-10 11:12 ` Bob Marley
2014-10-10 15:18 ` cwillu
2014-10-10 14:37 ` Chris Murphy
2014-10-10 17:43 ` Bob Marley
2014-10-10 17:53 ` Bardur Arantsson
2014-10-10 19:35 ` Austin S Hemmelgarn
2014-10-10 22:05 ` Eric Sandeen
2014-10-13 11:26 ` Austin S Hemmelgarn
2014-10-12 10:14 ` Martin Steigerwald [this message]
2014-10-12 23:59 ` Duncan
2014-10-13 11:37 ` Austin S Hemmelgarn
2014-10-13 11:48 ` Rich Freeman
2014-10-11 7:29 ` Goffredo Baroncelli
2014-11-17 20:55 ` Phillip Susi
2014-10-12 10:06 ` Martin Steigerwald
2014-10-12 10:17 ` Martin Steigerwald
2014-10-13 21:09 ` Josef Bacik
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=2313804.P0rE2GFdbV@merkaba \
--to=martin@lichtvoll.de \
--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).