From: "Holger Hoffstätte" <holger@applied-asynchrony.com>
To: dsterba@suse.cz, Omar Sandoval <osandov@osandov.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com,
bo.li.liu@oracle.com
Subject: Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()
Date: Thu, 10 Nov 2016 16:37:24 +0100 [thread overview]
Message-ID: <58249434.4080903@applied-asynchrony.com> (raw)
In-Reply-To: <20161110150651.GE12522@twin.jikos.cz>
On 11/10/16 16:06, David Sterba wrote:
> On Wed, Nov 09, 2016 at 03:26:50PM -0800, Omar Sandoval wrote:
>> From: Omar Sandoval <osandov@fb.com>
>> [snip]
>> Commit 8dff9c853410 ("Btrfs: deal with duplciates during extent_map
>> insertion in btrfs_get_extent") fixed a case in btrfs_get_extent() where
>> two threads race on adding the same extent map to an inode's extent map
>> tree. However, if the added em is merged with an adjacent em in the
>> extent tree, then we'll end up with an existing extent that is not
>> identical to but instead encompasses the extent we tried to add. When we
>> call merge_extent_mapping() to find the nonoverlapping part of the new
>> em, the arithmetic overflows because there is no such thing. We then end
>> up trying to add a bogus em to the em_tree, which results in a EEXIST
>> that can bubble all the way up to userspace.
>
> Is this possibly the same bug that Liu Bo fixes in
> https://patchwork.kernel.org/patch/9413129/ ?
Seem similar, but I can't reproduce without that patch either..
-h
next prev parent reply other threads:[~2016-11-10 15:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 23:26 [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent() Omar Sandoval
2016-11-10 15:06 ` David Sterba
2016-11-10 15:37 ` Holger Hoffstätte [this message]
2016-11-10 15:42 ` Omar Sandoval
2016-11-11 0:36 ` Liu Bo
2016-11-10 15:11 ` Holger Hoffstätte
2016-11-10 15:37 ` Omar Sandoval
2016-11-10 16:01 ` Holger Hoffstätte
2016-11-10 16:20 ` Omar Sandoval
2016-11-10 16:31 ` Holger Hoffstätte
2016-11-10 20:01 ` Liu Bo
2016-11-10 20:09 ` Omar Sandoval
2016-11-10 20:24 ` Omar Sandoval
2016-11-10 22:38 ` Liu Bo
2016-11-10 22:45 ` Omar Sandoval
2016-11-17 0:32 ` Omar Sandoval
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=58249434.4080903@applied-asynchrony.com \
--to=holger@applied-asynchrony.com \
--cc=bo.li.liu@oracle.com \
--cc=dsterba@suse.cz \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=osandov@osandov.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 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.