aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorArne Jansen <sensille@gmx.net>2011-09-14 09:58:21 -0400
committerJan Schmidt <list.btrfs@jan-o-sch.net>2012-07-12 04:54:40 -0400
commit6f72c7e20dbaea55f04546de69586c84a3654503 (patch)
tree4d8e13968765f4a4381a0fe91a4fb157128cbbc5 /fs/btrfs/transaction.c
parent5d13a37bd5327220e13329943d1228acfbe5934a (diff)
Btrfs: add qgroup inheritance
When creating a subvolume or snapshot, it is necessary to initialize the qgroup account with a copy of some other (tracking) qgroup. This patch adds parameters to the ioctls to pass the information from which qgroup to inherit. Signed-off-by: Arne Jansen <sensille@gmx.net>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index f1e29fbd5317..127283913a42 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -990,6 +990,14 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
990 } 990 }
991 } 991 }
992 992
993 ret = btrfs_qgroup_inherit(trans, fs_info, root->root_key.objectid,
994 objectid, pending->inherit);
995 kfree(pending->inherit);
996 if (ret) {
997 pending->error = ret;
998 goto fail;
999 }
1000
993 key.objectid = objectid; 1001 key.objectid = objectid;
994 key.offset = (u64)-1; 1002 key.offset = (u64)-1;
995 key.type = BTRFS_ROOT_ITEM_KEY; 1003 key.type = BTRFS_ROOT_ITEM_KEY;