summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDongsheng Yang <yangds.fnst@cn.fujitsu.com>2014-11-20 21:04:56 -0500
committerChris Mason <clm@fb.com>2015-04-13 07:52:42 -0700
commitd3001ed3a82ec2696bb13c78092d0a3460003fd7 (patch)
tree31b6c82488e64a6cf1d028b1267f16122dc5e451 /fs/btrfs
parent1510e71c620c27ffc7540176a0689f70d6915e28 (diff)
downloadlinux-d3001ed3a82ec2696bb13c78092d0a3460003fd7.tar.gz
linux-d3001ed3a82ec2696bb13c78092d0a3460003fd7.tar.bz2
linux-d3001ed3a82ec2696bb13c78092d0a3460003fd7.zip
btrfs: qgroup: update limit info in function btrfs_run_qgroups().
When we commit_transaction(), qgroups in btree should be updated. But, limit info is not considered currently. It will cause a problem when a qgroup of a snapshot inherit the limit info from srcqgroup, then there is an inconsistency. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/qgroup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index bf0702a865f8..5d1d75611745 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -2154,6 +2154,10 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
if (ret)
fs_info->qgroup_flags |=
BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
+ ret = update_qgroup_limit_item(trans, quota_root, qgroup);
+ if (ret)
+ fs_info->qgroup_flags |=
+ BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
spin_lock(&fs_info->qgroup_lock);
}
if (fs_info->quota_enabled)