kdave / btrfs-progs

Development of userspace BTRFS tools
GNU General Public License v2.0
527 stars 239 forks source link

`qgroup destroy`: warn if qgroup cannot be removed after subvolume deletion #782

Open kdave opened 2 months ago

kdave commented 2 months ago

Removing a stale qgroup may not succeed for several reasons:

https://lore.kernel.org/linux-btrfs/fa8f65936f31c07ca4783229140ecfb1f7ada785.1714082499.git.wqu@suse.com/ :

The option --delete-qgroup has been removed but the same can happen with btrfs qgroup destroy as it's the same implementation by an ioctl.

We need to catch the conditions preventing the deletion and warn, or add options that will try to do the right thing at some cost, like waiting until the subvolume is cleaned.

adam900710 commented 2 months ago

This sounds very reasonable and would be much more user friendly.

I'll add this feature soon.