This patch makes it so level-0 qgroups are automatically deleted. The flag that enables this behaviour is persisted in btrfs_qgroup_status_item. Although, it may make sense to introduce a btrfs_qgroup_configuration_item, it seems somewhat overkill to do that just for one simple knob that can fit into the existing flags.
The reason why this is a sysfs knob, and not a mount option is because qgroups have to be enabled after the first mount. Having to do a mount, enable qgroups, flip the knob, and then remounting seems somewhat more awkward than this single sysfs knob. Changes since v1: * Move from mount option to sysfs knob * Persist the knob across remounts Sargun Dhillon (1): btrfs: Add mechanism to configure automatic level-0 qgroup removal fs/btrfs/ctree.h | 2 +- fs/btrfs/ioctl.c | 14 +++++++ fs/btrfs/sysfs.c | 91 ++++++++++++++++++++++++++++++++++++----- include/uapi/linux/btrfs_tree.h | 7 ++++ 4 files changed, 103 insertions(+), 11 deletions(-) -- 2.11.0 -- 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