From: Alexandre Oliva <oliva@gnu.org>
To: Chris Mason <clmason@fusionio.com>
Cc: "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: Thu, 21 Mar 2013 04:14:02 -0300 [thread overview]
Message-ID: <ord2utb4xx.fsf@livre.home> (raw)
In-Reply-To: <or1ubaesrx.fsf@livre.home> (Alexandre Oliva's message of "Tue, 19 Mar 2013 22:58:42 -0300")
On Mar 19, 2013, Alexandre Oliva <oliva@gnu.org> wrote:
> On Mar 19, 2013, Alexandre Oliva <oliva@gnu.org> wrote:
>>> that is being processed inside the snapshot.
>> This doesn't explain why the master database occasionally gets similarly
>> corrupted, does it?
> Actually, scratch this bit for now. I don't really have proof that the
> master database actually gets corrupted while it's in use
Scratch the “scratch this”. The master database actually gets
corrupted, and it's with recently-created files, created after earlier
known-good snapshots. So, it can't really be orphan processing, can it?
Some more info from the errors and instrumentation:
- no data syncing on the affected files is taking place. it's just
memcpy()ing data in <4KiB-sized chunks onto mmap()ed areas,
munmap()ing it, growing the file with ftruncate and mapping a
subsequent chunk for further output
- the NULs at the end of pages do NOT occur at munmap/mmap boundaries as
I suspected at first, but they do coincide with the end of extents
that are smaller than the maximum compressed extent size. So,
something's making btrfs flush pages to disk before the pages are
completely written (which is fine in principle), but apparently
failing to pick up subsequent changes to the pages (eek!)
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Oliva <oliva@gnu.org>
To: Chris Mason <clmason@fusionio.com>
Cc: "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: Thu, 21 Mar 2013 04:14:02 -0300 [thread overview]
Message-ID: <ord2utb4xx.fsf@livre.home> (raw)
In-Reply-To: <or1ubaesrx.fsf@livre.home> (Alexandre Oliva's message of "Tue, 19 Mar 2013 22:58:42 -0300")
On Mar 19, 2013, Alexandre Oliva <oliva@gnu.org> wrote:
> On Mar 19, 2013, Alexandre Oliva <oliva@gnu.org> wrote:
>>> that is being processed inside the snapshot.
>> This doesn't explain why the master database occasionally gets similarly
>> corrupted, does it?
> Actually, scratch this bit for now. I don't really have proof that the
> master database actually gets corrupted while it's in use
Scratch the “scratch this”. The master database actually gets
corrupted, and it's with recently-created files, created after earlier
known-good snapshots. So, it can't really be orphan processing, can it?
Some more info from the errors and instrumentation:
- no data syncing on the affected files is taking place. it's just
memcpy()ing data in <4KiB-sized chunks onto mmap()ed areas,
munmap()ing it, growing the file with ftruncate and mapping a
subsequent chunk for further output
- the NULs at the end of pages do NOT occur at munmap/mmap boundaries as
I suspected at first, but they do coincide with the end of extents
that are smaller than the maximum compressed extent size. So,
something's making btrfs flush pages to disk before the pages are
completely written (which is fine in principle), but apparently
failing to pick up subsequent changes to the pages (eek!)
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer
next prev parent reply other threads:[~2013-03-21 7:14 UTC|newest]
Thread overview: 42+ 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 21:14 ` Alexandre Oliva
2013-03-18 22:43 ` Alexandre Oliva
2013-03-18 22:52 ` Chris Mason
2013-03-18 22:52 ` Chris Mason
2013-03-19 5:20 ` Alexandre Oliva
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-19 19:26 ` Alexandre Oliva
2013-03-19 19:26 ` Alexandre Oliva
2013-03-20 1:58 ` Alexandre Oliva
2013-03-20 1:58 ` Alexandre Oliva
2013-03-21 7:14 ` Alexandre Oliva [this message]
2013-03-21 7:14 ` Alexandre Oliva
2013-03-21 18:06 ` Chris Mason
2013-03-21 18:06 ` Chris Mason
2013-03-21 23:06 ` Chris Mason
2013-03-21 23:06 ` Chris Mason
2013-03-22 5:27 ` Alexandre Oliva
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:17 ` Alexandre Oliva
2013-03-22 14:26 ` Chris Mason
2013-03-22 17:06 ` Samuel Just
2013-03-22 17:12 ` Chris Mason
2013-03-23 9:47 ` Alexandre Oliva
2013-03-23 9:47 ` Alexandre Oliva
2013-03-22 17:08 ` David Sterba
2013-03-23 9:48 ` Alexandre Oliva
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 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=ord2utb4xx.fsf@livre.home \
--to=oliva@gnu.org \
--cc=ceph-devel@vger.kernel.org \
--cc=clmason@fusionio.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 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.