From: Chris Mason <clmason@fusionio.com>
To: Samuel Just <sam.just@inktank.com>
Cc: Alexandre Oliva <oliva@gnu.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: corruption of active mmapped files in btrfs snapshots
Date: Fri, 22 Mar 2013 13:12:14 -0400 [thread overview]
Message-ID: <20130322171214.27874.48118@localhost.localdomain> (raw)
In-Reply-To: <CA+4uBUbyF-3yiBQ00xP4NHEX96CXa9HZo5-ZYdZ3Fjrfnm=Ssw@mail.gmail.com>
In this case, I think Alexandre is scanning for zeros in the file. The
incomplete writes will definitely show that.
-chris
Quoting Samuel Just (2013-03-22 13:06:41)
> Incomplete writes for leveldb should just result in lost updates, not
> corruption. Also, we do stop writes before the snapshot is initiated
> so there should be no in-progress writes to leveldb other than leveldb
> compaction (though that might be something to investigate).
> -Sam
>
> On Fri, Mar 22, 2013 at 7:26 AM, Chris Mason <clmason@fusionio.com> wrote:
> > Quoting Alexandre Oliva (2013-03-22 10:17:30)
> >> On Mar 22, 2013, Chris Mason <clmason@fusionio.com> wrote:
> >>
> >> > Are you using compression in btrfs or just in leveldb?
> >>
> >> btrfs lzo compression.
> >
> > Perfect, I'll focus on that part of things.
> >
> >>
> >> > I'd like to take snapshots out of the picture for a minute.
> >>
> >> That's understandable, I guess, but I don't know that anyone has ever
> >> got the problem without snapshots. I mean, even when the master copy of
> >> the database got corrupted, snapshots of the subvol containing it were
> >> being taken every now and again, because that's the way ceph works.
> >
> > Hopefully Sage can comment, but the basic idea is that if you snapshot a
> > database file the db must participate. If it doesn't, it really is the
> > same effect as crashing the box.
> >
> > Something is definitely broken if we're corrupting the source files
> > (either with or without snapshots), but avoiding incomplete writes in
> > the snapshot files requires synchronization with the db.
> >
> > -chris
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-03-22 17:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 21:14 corruption of active mmapped files in btrfs snapshots Alexandre Oliva
2013-03-18 22:43 ` Alexandre Oliva
2013-03-18 22:52 ` Chris Mason
2013-03-19 5:20 ` Alexandre Oliva
2013-03-19 12:09 ` Chris Mason
2013-03-19 17:29 ` Sage Weil
2013-03-19 19:26 ` Alexandre Oliva
2013-03-19 19:26 ` Alexandre Oliva
2013-03-20 1:58 ` Alexandre Oliva
2013-03-21 7:14 ` Alexandre Oliva
2013-03-21 18:06 ` Chris Mason
2013-03-21 23:06 ` Chris Mason
2013-03-22 5:27 ` Alexandre Oliva
2013-03-22 12:07 ` Chris Mason
2013-03-22 14:17 ` Alexandre Oliva
2013-03-22 14:26 ` Chris Mason
2013-03-22 17:06 ` Samuel Just
2013-03-22 17:12 ` Chris Mason [this message]
2013-03-23 9:47 ` Alexandre Oliva
2013-03-22 17:08 ` David Sterba
2013-03-23 9:48 ` Alexandre Oliva
2013-03-25 15:33 ` David Sterba
2013-03-22 17:18 ` Sage Weil
2013-03-22 18:07 ` Chris Mason
2013-03-22 20:31 ` Chris Mason
2013-03-26 0:08 ` Chris Mason
2013-03-29 9:56 ` Alexandre Oliva
2013-03-29 11:35 ` Chris Mason
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=20130322171214.27874.48118@localhost.localdomain \
--to=clmason@fusionio.com \
--cc=ceph-devel@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=oliva@gnu.org \
--cc=sam.just@inktank.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