Bug 1222963

Summary: btrfs option --delete-qgroup unreliable
Product: [openSUSE] openSUSE Tumbleweed Reporter: Arvin Schnell <aschnell>
Component: BasesystemAssignee: David Sterba <dsterba>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: aschnell, dsterba, wqu
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
See Also: https://bugzilla.suse.com/show_bug.cgi?id=1222847
https://bugzilla.suse.com/show_bug.cgi?id=972511
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Arvin Schnell 2024-04-17 12:31:54 UTC
The btrfs option --delete-qgroup when deleting subvolumes is unreliable:

# btrfs subvolume create /test1/yls
Create subvolume '/test1/yls'
# btrfs quota rescan --wait /test1
quota rescan started
# btrfs subvolume delete --delete-qgroup /test1/yls
Delete subvolume 4804 (no-commit): '/test1/yls'
WARNING: unable to delete qgroup 0/0: Device or resource busy

Note: The qgroup in the warning is also wrong.
Comment 1 Wenruo Qu 2024-04-25 21:52:43 UTC
The design of --delete-qgroup doesn't take all the challenges of qgroup into consideration.

In fact, for most cases that options would not work at all.

I'm even considering reverting those patches.
Comment 2 David Sterba 2024-04-29 17:42:35 UTC
Yeah, the option does not work as expected and will be removed upstream.
Comment 3 David Sterba 2024-05-09 10:44:53 UTC
The option has been removed in released btrfs-progs 6.8.1. There's work in progress to do the deletion properly, either in kernel in or in progs.