Hi all, currently BTRFS doesn't allow an ordinary user to remove a subvolume (or snapshot). I think that the reasons is simple: a subvolume may contain files/directories owned by other user. Allowing an ordinary user to remove a subvolume means allowing an ordinary user to remove filess/directories owned by other user. And this is not good. Moreover BTRFS removes a subvolume asynchronously, so it is not possible to return an error like “hey you are trying to remove a not your file ! Don’t do it !”. My idea is to add another ioctl that permits to remove a subvolume only when it is empty and its host directory is writable by the user… like a directory. An option is to allow to remove an empty subvolume with the unlink(2) syscall: no more tool is needed ! This will solve a lot of problem: - Consistently with the current unlink(2) behavior - The kernel has not to do complicate check - There no is necessity to add another interface to wait the releasing of the space (see other thread reserving an IOCTL number; other details ). The disadvantage is that it should be slower than the currently implementation. Of course I don’t want to remove the existing interface. I want only to add another one. Comments ? Thoughts ? Regards G.Baroncelli -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
