mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-26 08:02:21 +00:00
82f7d6c1d7
The current stale qgroup deletion doesn't handle the following cases at all: - It doesn't detect stale qgroups correctly The current check is using the root backref, which means unlinked but not yet fully dropped subvolumes would mark its corresponding qgroups stale. This is incorrect. The real stale check should be based on the root item, not root backref. - Squota non-empty but stale qgroups Such qgroups can not and should not be deleted, as future accounting still require them. - Full accounting mode, stale qgroups but not empty Since qgroup numbers are inconsistent already, it's common to have such stale qgroups with non-zero numbers. Now it's dependent on the kernel to determine whether such qgroup can be deleted. Address the above problems: - Do root_item based detection So that btrfs_qgroup::stale would properly indicate if there is a subvolume root item for the qgroup. - Do not attempt to delete squota stale but non-empty qgroups - Attempt to delete stale but non-empty qgroups for full accounting mode And deletion failure would not count as an error. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
balance.c | ||
commands.h | ||
device.c | ||
filesystem-du.c | ||
filesystem-usage.c | ||
filesystem-usage.h | ||
filesystem.c | ||
inspect-dump-super.c | ||
inspect-dump-tree.c | ||
inspect-tree-stats.c | ||
inspect.c | ||
property.c | ||
props.h | ||
qgroup.c | ||
qgroup.h | ||
quota.c | ||
receive-dump.c | ||
receive-dump.h | ||
receive.c | ||
reflink.c | ||
replace.c | ||
rescue-chunk-recover.c | ||
rescue-super-recover.c | ||
rescue.c | ||
rescue.h | ||
restore.c | ||
scrub.c | ||
send.c | ||
subvolume-list.c | ||
subvolume.c | ||
subvolume.h |