aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-02-27 03:24:28 -0500
committerChris Mason <clm@fb.com>2015-04-13 10:53:00 -0400
commite082f56313f374d723b0366978ddb062c8fe79ea (patch)
tree3d60cf81877f8c43b1d71c091bb4fb7a63064d36 /fs/btrfs
parent9c8b35b1ba21bbf7527056f394aa6109424c55ef (diff)
btrfs: quota: Update quota tree after qgroup relationship change.
Previous patch modified the in memory struct but it's not written in quota tree until next commit. So user will still get old data using "btrfs qgroup show" after assign/remove. This patch will call btrfs_run_qgroups in assign ioctl so it will be updated to in memory quota trees and user will get up-to-date results. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/ioctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index e38b645c5015..ca5d968f4c37 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -4641,6 +4641,11 @@ static long btrfs_ioctl_qgroup_assign(struct file *file, void __user *arg)
4641 sa->src, sa->dst); 4641 sa->src, sa->dst);
4642 } 4642 }
4643 4643
4644 /* update qgroup status and info */
4645 err = btrfs_run_qgroups(trans, root->fs_info);
4646 if (err < 0)
4647 btrfs_error(root->fs_info, ret,
4648 "failed to update qgroup status and info\n");
4644 err = btrfs_end_transaction(trans, root); 4649 err = btrfs_end_transaction(trans, root);
4645 if (err && !ret) 4650 if (err && !ret)
4646 ret = err; 4651 ret = err;