On Fri, May 29, 2020 at 05:14:20PM +0200, Damian Stevenson wrote: > # Error description > Trying to delete subvolume which is set as default, not allowed. > States reason to dmesg but not to terminal. > > # Request: > Output to terminal as well, the reason why can't delete subvolume. In > example: because subvolume is set as default on deletion intent. As > user I didn't knew I had to follow dmesg, read it just out of luck. Thanks for the detailed report. You're right, this should be printed as an error message. > # On deletion intent > sudo btrfs subvolume delete /drive/newvol/ > Delete subvolume (no-commit): '/drive/newvol' > ERROR: Could not destroy subvolume/snapshot: Operation not permitted This is easy to fix, if anybody wants to take it, if the subvolume deletion returns -1 and EPERM, then check if the subvolume is default (btrfs_util_get_default_subvolume_fd) and then print the message. Additionally, if there's EPERM and the subvolume is not default, it's either race (the subvolume lost the default status meanwhie), or there's send in progress. As this could be also confusing, fixing both would be welcome. > https://bugzilla.kernel.org/show_bug.cgi?id=207975 I've cross-referenced in github/btrfs-progs issue.
