diff options
author | Mark Fasheh <mfasheh@suse.de> | 2015-11-05 14:38:00 -0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-11-25 05:27:33 -0800 |
commit | 82bd101b5240d3d1c4078a8017917a40c0dcc514 (patch) | |
tree | 0105605d854d46179bd8805b91994510f5b79365 /fs/btrfs/delayed-inode.h | |
parent | 2d9e97761087b46192c18181dfd1e7a930defcfd (diff) |
btrfs: qgroup: account shared subtree during snapshot delete
Commit 0ed4792 ('btrfs: qgroup: Switch to new extent-oriented qgroup
mechanism.') removed our qgroup accounting during
btrfs_drop_snapshot(). Predictably, this results in qgroup numbers
going bad shortly after a snapshot is removed.
Fix this by adding a dirty extent record when we encounter extents during
our shared subtree walk. This effectively restores the functionality we had
with the original shared subtree walking code in 1152651 (btrfs: qgroup:
account shared subtrees during snapshot delete).
The idea with the original patch (and this one) is that shared subtrees can
get skipped during drop_snapshot. The shared subtree walk then allows us a
chance to visit those extents and add them to the qgroup work for later
processing. This ultimately makes the accounting for drop snapshot work.
The new qgroup code nicely handles all the other extents during the tree
walk via the ref dec/inc functions so we don't have to add actions beyond
what we had originally.
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/delayed-inode.h')
0 files changed, 0 insertions, 0 deletions