diff options
author | Dongsheng Yang <yangds.fnst@cn.fujitsu.com> | 2014-11-24 16:27:09 +0100 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-04-13 16:52:52 +0200 |
commit | f5a6b1c53bdd44f79e3904c0f5e59f956b49b2c8 (patch) | |
tree | 48a56daac94c95f58f3a6c10ef5c10bf0d7d0c19 /fs/readdir.c | |
parent | btrfs: qgroup: return EINVAL if level of parent is not higher than child's. (diff) | |
download | linux-f5a6b1c53bdd44f79e3904c0f5e59f956b49b2c8.tar.xz linux-f5a6b1c53bdd44f79e3904c0f5e59f956b49b2c8.zip |
btrfs: qgroup: allow to remove qgroup which has parent but no child.
When a qgroup has parents but no child, it should be removable in
Theory I think. But currently, we can not remove it when it has
either parent or child.
Example:
# btrfs quota enable /mnt
# btrfs qgroup create 1/0 /mnt
# btrfs qgroup create 2/0 /mnt
# btrfs qgroup assign 1/0 2/0 /mnt
# btrfs qgroup show -pcre /mnt
qgroupid rfer excl max_rfer max_excl parent child
-------- ---- ---- -------- -------- ------ -----
0/5 16384 16384 0 0 --- ---
1/0 0 0 0 0 2/0 ---
2/0 0 0 0 0 --- 1/0
At this time, there is no subvol or qgroup depending on it.
Just a qgroup 2/0 is its parent, but 2/0 can work well without
1/0. So I think 1/0 should be removalbe. But:
# btrfs qgroup destroy 1/0 /mnt
ERROR: unable to destroy quota group: Device or resource busy
This patch remove the check of qgroup->parent in removing it,
then we can remove a qgroup when it has a parent.
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/readdir.c')
0 files changed, 0 insertions, 0 deletions