From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: repair: Trickle down EEXISTS while freeing
Date: Mon, 31 Oct 2016 13:43:20 -0500 [thread overview]
Message-ID: <211e0109-1ce7-44fd-1e73-a1f1a96c44e2@suse.de> (raw)
In-Reply-To: <20161028144202.GH12522@twin.jikos.cz>
Hi David,
On 10/28/2016 09:42 AM, David Sterba wrote:
> On Thu, Oct 27, 2016 at 01:05:08PM -0500, Goldwyn Rodrigues wrote:
>> While deleting pending extents, we insert extents to the
>> extent_tree. However, because of corruption, this might already be
>> freed. We trickle the EEXISTS error and let the caller decide what
>> needs to be done with it. In this case, ignore, so the repair may
>> proceed.
>>
>> The primary motivation of this is to resolve this BUG_ON:
>> extent-tree.c:2731: alloc_reserved_tree_block: Assertion `ret`
>> failed, value 0
>>
>> #2 assert_trace (val=0, line=2728, func=0x489510 <__func__.11558>
>> "alloc_reserved_tree_block", filename=0x489065 "extent-tree.c",
>> assertion=0x48cfb5 "ret") at kerncompat.h:102 #3
>> alloc_reserved_tree_block (trans=trans@entry=0x7e7240,
>> root=root@entry=0x6a88a0, root_objectid=2, generation=175654,
>> flags=0, key=key@entry=0x2bc5c70, level=0,
>> ins=ins@entry=0x7fffffffcf30) at extent-tree.c:2728 #4
>> finish_current_insert (trans=trans@entry=0x7e7240,
>> extent_root=extent_root@entry=0x6a88a0) at extent-tree.c:2108 #5
>> __free_extent (trans=trans@entry=0x7e7240,
>> root=root@entry=0x6a88a0, bytenr=57127387136, num_bytes=<optimized
>> out>, parent=parent@entry=0, root_objectid=<optimized out>,
>> owner_objectid=0, owner_offset=owner_offset@entry=0,
>> refs_to_drop=refs_to_drop@entry=1) at extent-tree.c:2410 #6
>> del_pending_extents (trans=trans@entry=0x7e7240,
>> extent_root=0x6a88a0) at extent-tree.c:2448
>
> Do you have a reproducer for that?
>> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
>
> Applied, thanks.
>
While working on a reproducer (and further testing), I found this leaves
the tree in a worse condition than before. Please leave this out for now.
--
Goldwyn
next prev parent reply other threads:[~2016-10-31 18:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 18:05 [PATCH] btrfs-progs: repair: Trickle down EEXISTS while freeing Goldwyn Rodrigues
2016-10-28 14:42 ` David Sterba
2016-10-28 15:02 ` Goldwyn Rodrigues
2016-10-28 16:22 ` David Sterba
2016-10-31 18:43 ` Goldwyn Rodrigues [this message]
2016-11-01 1:21 ` David Sterba
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=211e0109-1ce7-44fd-1e73-a1f1a96c44e2@suse.de \
--to=rgoldwyn@suse.de \
--cc=dsterba@suse.cz \
--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).