projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c99f1b0
)
btrfs: qgroup: inherit limit info from srcgroup in creating snapshot.
author
Dongsheng Yang
<
[email protected]
>
Fri, 21 Nov 2014 01:14:38 +0000
(20:14 -0500)
committer
Chris Mason
<
[email protected]
>
Mon, 13 Apr 2015 14:52:38 +0000
(07:52 -0700)
Currently, when we snapshot a subvol, snapshot will not copy the limits
from srcqgroup.
This patch make the qgroup in snapshot inherit the limit info when create
a snapshot.
Signed-off-by: Dongsheng Yang <
[email protected]
>
Signed-off-by: Chris Mason <
[email protected]
>
fs/btrfs/qgroup.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/qgroup.c
b/fs/btrfs/qgroup.c
index 37188c6b408ddaee091edbafe7ae85ce94b45463..34c2753fa4e18bddd23ad22379df496cb5ecc462 100644
(file)
--- a/
fs/btrfs/qgroup.c
+++ b/
fs/btrfs/qgroup.c
@@
-2302,6
+2302,14
@@
int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans,
dstgroup->excl_cmpr = level_size;
srcgroup->excl = level_size;
srcgroup->excl_cmpr = level_size;
+
+ /* inherit the limit info */
+ dstgroup->lim_flags = srcgroup->lim_flags;
+ dstgroup->max_rfer = srcgroup->max_rfer;
+ dstgroup->max_excl = srcgroup->max_excl;
+ dstgroup->rsv_rfer = srcgroup->rsv_rfer;
+ dstgroup->rsv_excl = srcgroup->rsv_excl;
+
qgroup_dirty(fs_info, dstgroup);
qgroup_dirty(fs_info, srcgroup);
}