From: Josef Bacik <jbacik@fusionio.com>
To: Jan Schmidt <list.btrfs@jan-o-sch.net>
Cc: Josef Bacik <jbacik@fusionio.com>, <linux-btrfs@vger.kernel.org>,
<dsterba@suse.cz>, <dustymabe@gmail.com>
Subject: Re: [PATCH] Btrfs: fix negative qgroup tracking from owner accounting (bug #61951)
Date: Wed, 6 Nov 2013 12:34:44 -0500 [thread overview]
Message-ID: <20131106173444.GD27784@localhost.localdomain> (raw)
In-Reply-To: <527A7A6F.7080407@jan-o-sch.net>
On Wed, Nov 06, 2013 at 06:20:47PM +0100, Jan Schmidt wrote:
>
> On Mon, November 04, 2013 at 18:42 (+0100), Josef Bacik wrote:
> > On Thu, Oct 24, 2013 at 03:22:06PM +0200, Jan Schmidt wrote:
> >> btrfs_dec_ref() queued a delayed ref for owner of a tree block. The qgroup
> >> tracking is based on delayed refs. The owner of a tree block is set when a
> >> tree block is allocated, it is never updated.
> >>
> >> When you allocate a tree block and then remove the subvolume that did the
> >> allocation, the qgroup accounting for that removal is correct. However, the
> >> removal was accounted again for each subvolume deletion that also referenced
> >> the tree block, because accounting was erroneously based on the owner.
> >>
> >> Instead of queueing delayed refs for the non-existent owner, we now
> >> queue delayed refs for the root being removed. This fixes the qgroup
> >> accounting.
> >>
> >> Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
> >> Tested-by: <dustymabe@gmail.com>
> >
> > This breaks btrfs/003, I'm kicking it out.
>
> Can you be a bit more specific? Works fine here.
>
It's blowing up on the balance, so maybe make a bigger fs and balance that so
you can see it? It's exploding in __btrfs_free_extent because we can't find the
ref we're trying to drop, so I assume you've broken the dropping of the reloc
root part where it depends on you giving it btrfs_header_owner() instead of
root->root_key.objectid as when we cow blocks that belong to the reloc root we
leave the owner set to whoever owned the block originally and not the reloc
root. Thanks,
Josef
next prev parent reply other threads:[~2013-11-06 17:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 13:22 [PATCH] Btrfs: fix negative qgroup tracking from owner accounting (bug #61951) Jan Schmidt
2013-10-24 14:49 ` Wang Shilong
2013-10-24 15:36 ` Jan Schmidt
2013-10-25 4:08 ` Wang Shilong
2013-11-01 9:16 ` Jan Schmidt
2013-11-01 12:42 ` Josef Bacik
2013-11-02 4:35 ` Wang Shilong
2013-11-01 9:19 ` Jan Schmidt
2013-11-01 15:07 ` Josef Bacik
2013-11-04 17:42 ` Josef Bacik
2013-11-06 17:20 ` Jan Schmidt
2013-11-06 17:34 ` Josef Bacik [this message]
2013-11-07 1:33 ` Wang Shilong
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=20131106173444.GD27784@localhost.localdomain \
--to=jbacik@fusionio.com \
--cc=dsterba@suse.cz \
--cc=dustymabe@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=list.btrfs@jan-o-sch.net \
/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).