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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html