Btrfs: creating the subvolume qgroup automatically when enabling quota
PATCH 1/1 Btrfs: creating the subvolume qgroup automatically when enabling quota
From: Wang Shilong <[email protected]>
Creating the subvolume/snapshots(including root subvolume) qgroup auotomatically when enabling quota.
Signed-off-by Wang Shilong <[email protected]>
Reviewed-by Miao Xie <[email protected]>
--- fs/btrfs/ioctl.c | 2 + fs/btrfs/qgroup.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 0 deletions(-)
fs/btrfs/ioctl.c +2 -0
@@ -3693,6 +3693,7 @@ static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg) goto drop_write; } +down_read (&root->fs_info->subvol_sem);if (sa->cmd !=BTRFS_QUOTA_CTL_RESCAN ) { trans =btrfs_start_transaction (root,2 );if (IS_ERR (trans)) {
@@ -3726,6 +3727,7 @@ static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg) } out:kfree (sa); +up_read (&root->fs_info->subvol_sem); drop_write:mnt_drop_write_file (file);return ret;
fs/btrfs/qgroup.c +55 -0
73 lines not on this page · raw message
Signature · 1 line
1.7.7.6