From: Nikolaus Rath <Nikolaus@rath.org>
To: linux-btrfs@vger.kernel.org
Subject: Re: fsck: to repair or not to repair
Date: Fri, 13 May 2016 08:28:18 -0700 [thread overview]
Message-ID: <87vb2ij7u5.fsf@vostro.rath.org> (raw)
In-Reply-To: <pan$14f07$a448b38$b8e37f4a$116d54ce@cox.net> (Duncan's message of "Fri, 13 May 2016 06:36:45 +0000 (UTC)")
On May 13 2016, Duncan <1i5t5.duncan@cox.net> wrote:
> Because btrfs can be multi-device, it needs some way to track which
> devices belong to each filesystem, and it uses filesystem UUID for this
> purpose.
>
> If you clone a filesystem (for instance using dd or lvm snapshotting,
> doesn't matter how) and then trigger a btrfs device scan, say by plugging
> in some other device with btrfs on it so udev triggers a scan, and the
> kernel sees multiple devices with the same filesystem UUID as a result,
> and one of those happens to be mounted, you can corrupt both copies as
> the kernel btrfs won't be able to tell them apart and may write updates
> to the wrong one.
That seems like a rather odd design. Why isn't btrfs refusing to mount
in this situation? In the face of ambiguity, guessing is generally bad
idea (at least for a computer program).
Best,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F
»Time flies like an arrow, fruit flies like a Banana.«
next prev parent reply other threads:[~2016-05-13 15:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 21:10 fsck: to repair or not to repair Nikolaus Rath
2016-05-12 17:02 ` Henk Slager
2016-05-12 17:35 ` Nikolaus Rath
2016-05-12 17:55 ` Ashish Samant
2016-05-13 6:36 ` Duncan
2016-05-13 15:28 ` Nikolaus Rath [this message]
2016-05-13 21:35 ` Chris Murphy
2016-05-16 11:17 ` Austin S. Hemmelgarn
2016-05-16 11:34 ` Andrei Borzenkov
2016-05-16 11:48 ` Austin S. Hemmelgarn
2016-06-10 3:40 ` Nikolaus Rath
2016-06-10 11:05 ` Austin S. Hemmelgarn
2016-06-10 15:54 ` Nikolaus Rath
2016-06-10 16:50 ` Adam Borowski
2016-06-10 16:55 ` Nikolaus Rath
2016-06-10 17:12 ` Austin S. Hemmelgarn
2016-06-10 17:22 ` Adam Borowski
2016-06-10 17:39 ` Austin S. Hemmelgarn
2016-06-10 17:40 ` Henk Slager
2016-06-10 15:55 ` Nikolaus Rath
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=87vb2ij7u5.fsf@vostro.rath.org \
--to=nikolaus@rath.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.