On 2018/03/21 16:46, Nikolay Borisov wrote: > > > On 20.03.2018 22:06, Goffredo Baroncelli wrote: >> On 03/20/2018 07:45 AM, Misono, Tomohiro wrote: >>> Deletion of subvolume by non-privileged user is completely restricted >>> by default because we can delete a subvolume even if it is not empty >>> and may cause data loss. In other words, when user_subvol_rm_allowed >>> mount option is used, a user can delete a subvolume containing the >>> directory which cannot be deleted directly by the user. >>> >>> However, there should be no harm to allow users to delete empty subvolumes >>> when rmdir(2) would have been allowed if they were normal directories. >>> This patch allows deletion of empty subvolume by default. >> >> Instead of modifying the ioctl, what about allowing rmdir(2) to work for an >> _empty_ subvolume (and all the permission check are satisfied) ? > > I'm inclined to agree with Goffredo. user_subvol_rm_allowed flag really > looks like a hack ontop of the ioctl. I'd rather we modify the generic > behavior.
Ok, I will send another patch which allows rmdir(2) to delete a subvolume. Thanks, Tomohiro Misono -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html