Btrfs: creating the subvolume qgroup automatically when enabling quota
Creating the subvolume/snapshots(including root subvolume) qgroup auotomatically when enabling quota. Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com> Reviewed-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
This commit is contained in:
committed by
Josef Bacik
parent
d4e3991b99
commit
7708f029dc
@@ -3697,6 +3697,7 @@ static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg)
|
||||
goto drop_write;
|
||||
}
|
||||
|
||||
down_write(&root->fs_info->subvol_sem);
|
||||
if (sa->cmd != BTRFS_QUOTA_CTL_RESCAN) {
|
||||
trans = btrfs_start_transaction(root, 2);
|
||||
if (IS_ERR(trans)) {
|
||||
@@ -3730,6 +3731,7 @@ static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg)
|
||||
}
|
||||
out:
|
||||
kfree(sa);
|
||||
up_write(&root->fs_info->subvol_sem);
|
||||
drop_write:
|
||||
mnt_drop_write_file(file);
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user