From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: kreijack@inwind.it, Christoph Anton Mitterer <calestyo@scientia.net>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Ongoing Btrfs stability issues
Date: Wed, 14 Mar 2018 15:27:32 -0400 [thread overview]
Message-ID: <1c54d4ed-a1ce-e6c4-a79b-f75ec1c14556@gmail.com> (raw)
In-Reply-To: <fc0c1f0d-59cd-f593-b63d-e62b8ffa3a43@inwind.it>
On 2018-03-14 14:39, Goffredo Baroncelli wrote:
> On 03/14/2018 01:02 PM, Austin S. Hemmelgarn wrote:
> [...]
>>>
>>> In btrfs, a checksum mismatch creates an -EIO error during the reading. In a conventional filesystem (or a btrfs filesystem w/o datasum) there is no checksum, so this problem doesn't exist.
>>>
>>> I am curious how ZFS solves this problem.
>> It doesn't support disabling COW or the O_DIRECT flag, so it just never has the problem in the first place.
>
> I would like to perform some tests: however I think that you are right. if you make a "double buffering" approach (copy the data in the page cache, compute the checksum, then write the data to disk), the mismatch should not happen. Of course this is incompatible with O_DIRECT; but disabling O_DIRECT is a prerequisite to the "double buffering"; alone it couldn't be sufficient; what about mmap ? Are we sure that this does a double buffering ?
There's a whole lot of applications that would be showing some pretty
serious issues if checksumming didn't work correctly with mmap(), so I
think it does work correctly given that we don't have hordes of angry
users and sysadmins beating down the doors.
>
> I would prefer that btrfs doesn't allow O_DIRECT with the COW files. I prefer this to the checksum mismatch bug.
This is only reasonable if you are writing to the files. Checksums
appear to be checked on O_DIRECT reads, and outside of databases and
VM's, read-only access accounts for a significant percentage of O_DIRECT
usage, partly because it is needed for AIO support (nginx for example
can serve files using AIO and O_DIRECT and gets a pretty serious
performance boost on heavily loaded systems by doing so).
next prev parent reply other threads:[~2018-03-14 19:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 16:18 Ongoing Btrfs stability issues Alex Adriaanse
2018-02-15 18:00 ` Nikolay Borisov
2018-02-15 19:41 ` Alex Adriaanse
2018-02-15 20:42 ` Nikolay Borisov
2018-02-16 4:54 ` Alex Adriaanse
2018-02-16 7:40 ` Nikolay Borisov
2018-02-16 19:44 ` Austin S. Hemmelgarn
2018-02-17 3:03 ` Duncan
2018-02-17 4:34 ` Shehbaz Jaffer
2018-02-17 15:18 ` Hans van Kranenburg
2018-02-17 16:42 ` Shehbaz Jaffer
2018-03-01 19:04 ` Alex Adriaanse
2018-03-01 19:40 ` Nikolay Borisov
2018-03-02 17:29 ` Liu Bo
2018-03-08 17:40 ` Alex Adriaanse
2018-03-09 9:54 ` Nikolay Borisov
2018-03-09 19:05 ` Alex Adriaanse
2018-03-10 12:04 ` Nikolay Borisov
2018-03-10 14:29 ` Christoph Anton Mitterer
2018-03-11 17:51 ` Goffredo Baroncelli
2018-03-11 22:37 ` Christoph Anton Mitterer
2018-03-12 21:22 ` Goffredo Baroncelli
2018-03-12 21:48 ` Christoph Anton Mitterer
2018-03-13 19:36 ` Goffredo Baroncelli
2018-03-13 20:10 ` Christoph Anton Mitterer
2018-03-14 12:02 ` Austin S. Hemmelgarn
2018-03-14 18:39 ` Goffredo Baroncelli
2018-03-14 19:27 ` Austin S. Hemmelgarn [this message]
2018-03-14 22:17 ` Goffredo Baroncelli
2018-03-13 13:47 ` Patrik Lundquist
2018-03-02 4:02 ` Qu Wenruo
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=1c54d4ed-a1ce-e6c4-a79b-f75ec1c14556@gmail.com \
--to=ahferroin7@gmail.com \
--cc=calestyo@scientia.net \
--cc=kreijack@inwind.it \
--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 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).