Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374911
b: refs/heads/master
c: 3d7b5a2
h: refs/heads/master
i:
  374909: 3007e51
  374907: 0b7a699
  374903: a51813e
  374895: 2da1611
  374879: d722b36
  374847: 1ecfc74
  374783: 3c01f5a
v: v3
  • Loading branch information
Jan Schmidt authored and Josef Bacik committed May 6, 2013
1 parent eb71066 commit 65189e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f2320360b0c35b86938bfc561124474f0dac6e4
refs/heads/master: 3d7b5a2882133a04716903b1f4878a64c6610842
11 changes: 11 additions & 0 deletions trunk/fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1493,10 +1493,14 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
{
struct btrfs_root *quota_root = fs_info->quota_root;
int ret = 0;
int start_rescan_worker = 0;

if (!quota_root)
goto out;

if (!fs_info->quota_enabled && fs_info->pending_quota_state)
start_rescan_worker = 1;

fs_info->quota_enabled = fs_info->pending_quota_state;

spin_lock(&fs_info->qgroup_lock);
Expand All @@ -1522,6 +1526,13 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
if (ret)
fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;

if (!ret && start_rescan_worker) {
ret = btrfs_qgroup_rescan(fs_info);
if (ret)
pr_err("btrfs: start rescan quota failed: %d\n", ret);
ret = 0;
}

out:

return ret;
Expand Down

0 comments on commit 65189e4

Please sign in to comment.