From: Mark Fasheh <mfasheh@suse.de>
To: linux-btrfs@vger.kernel.org
Cc: Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>,
Mark Fasheh <mfasheh@suse.de>
Subject: [PATCH 0/2] btrfs: qgroup fixes for btrfs_drop_snapshot
Date: Thu, 19 Jun 2014 14:49:25 -0700 [thread overview]
Message-ID: <1403214567-3137-1-git-send-email-mfasheh@suse.de> (raw)
Hi, the following patches try to fix a long outstanding issue with qgroups
and snapshot deletion. The core problem is that btrfs_drop_snapshot will
skip shared extents during it's tree walk. This results in an inconsistent
qgroup state once the drop is processed.
The first patch adds some tracing which I found very useful in debugging
qgroup operations. The second patch is an actual fix to the problem.
Even with this patch series, we still have some inconsistency in qgroups
when a snapshot is deleted. As far as I can tell this is because shared
subtree roots are not completely skipped and may get passed to the qgroup
subsystem via a number of ref operations that happen during drop snapshot.
I am working on a fix for that issue, but feel that what I have here gets us
90% of the way to a full fix.
Please review, thanks. Diffstat follows,
--Mark
fs/btrfs/extent-tree.c | 234 +++++++++++++++++++++++++++++++++++++++++++
fs/btrfs/qgroup.c | 169 +++++++++++++++++++++++++++++--
fs/btrfs/qgroup.h | 1
fs/btrfs/super.c | 1
include/trace/events/btrfs.h | 57 ++++++++++
5 files changed, 456 insertions(+), 6 deletions(-)
next reply other threads:[~2014-06-19 21:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 21:49 Mark Fasheh [this message]
2014-06-19 21:49 ` btrfs: add trace for qgroup accounting Mark Fasheh
2014-06-19 21:58 ` Josef Bacik
2014-06-19 21:49 ` btrfs: qgroup: account shared subtrees during snapshot delete Mark Fasheh
2014-06-19 22:25 ` Josef Bacik
2014-06-19 23:16 ` Mark Fasheh
2014-06-19 23:17 ` Josef Bacik
2014-06-20 11:25 ` David Sterba
2014-06-20 15:29 ` Mark Fasheh
2014-06-20 15:44 ` Josef Bacik
2014-06-20 17:18 ` Mark Fasheh
2014-06-23 14:49 ` 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=1403214567-3137-1-git-send-email-mfasheh@suse.de \
--to=mfasheh@suse.de \
--cc=clm@fb.com \
--cc=jbacik@fb.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 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).