From: Josef Bacik <jbacik@fb.com>
To: "Holger Hoffstätte" <holger.hoffstaette@googlemail.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH V2] Btrfs: keep dropped roots in cache until transaction commit
Date: Tue, 15 Sep 2015 11:56:39 -0400 [thread overview]
Message-ID: <55F83FB7.8010801@fb.com> (raw)
In-Reply-To: <55F83E34.3090900@googlemail.com>
On 09/15/2015 11:50 AM, Holger Hoffstätte wrote:
> On 09/15/15 16:07, Josef Bacik wrote:
>> When dropping a snapshot we need to account for the qgroup changes. If we drop
>> the snapshot in all one go then the backref code will fail to find blocks from
>> the snapshot we dropped since it won't be able to find the root in the fs root
>> cache. This can lead to us failing to find refs from other roots that pointed
>> at blocks in the now deleted root. To handle this we need to not remove the fs
>> roots from the cache until after we process the qgroup operations. Do this by
>> adding dropped roots to a list on the transaction, and letting the transaction
>> remove the roots at the same time it drops the commit roots. This will keep all
>> of the backref searching code in sync properly, and fixes a problem Mark was
>> seeing with snapshot delete and qgroups. Thanks,
>>
>> Signed-off-by: Josef Bacik <jbacik@fb.com>
>> ---
>> V1->V2:
>> -clear the trans tag when we are finished dropping the subvol so we don't try to
>> update the root during commit.
>
> This V2 does indeed seem to fix the issues I reported with snapshot deletion &
> concurrent sync. I've now created/filled/deleted countless snapshots while issuing
> sync(s) in parallel, and the problem that I saw fairly frequently with V1 no longer
> seems to occur here. Therefore:
>
> Tested-by: Holger Hoffstätte <holger.hoffstaette@googlemail.com>
>
> Thanks for the quick fix, Josef!
>
Great thanks,
Josef
next prev parent reply other threads:[~2015-09-15 15:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 14:07 [PATCH V2] Btrfs: keep dropped roots in cache until transaction commit Josef Bacik
2015-09-15 15:50 ` Holger Hoffstätte
2015-09-15 15:56 ` Josef Bacik [this message]
2015-09-15 19:08 ` Holger Hoffstätte
2015-09-15 19:15 ` Josef Bacik
2015-09-15 19:39 ` Holger Hoffstätte
2015-09-16 8:58 ` Holger Hoffstätte
2015-09-16 13:50 ` Josef Bacik
2015-09-16 14:00 ` Holger Hoffstätte
2015-09-18 18:28 ` Omar Sandoval
-- strict thread matches above, loose matches on Subject: below --
2015-09-16 14:31 Glyn Normington
2015-09-16 14:48 ` Holger Hoffstätte
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=55F83FB7.8010801@fb.com \
--to=jbacik@fb.com \
--cc=holger.hoffstaette@googlemail.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.