From d5c1207017cd8387b4d3224dd7ab6cf5cd7f1c9a Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Thu, 28 Feb 2013 10:04:33 +0000 Subject: Btrfs: fix wrong reserved space in qgroup during snap/subv creation There are two problems in the space reservation of the snapshot/ subvolume creation. - don't reserve the space for the root item insertion - the space which is reserved in the qgroup is different with the free space reservation. we need reserve free space for 7 items, but in qgroup reservation, we need reserve space only for 3 items. So we implement new metadata reservation functions for the snapshot/subvolume creation. Signed-off-by: Miao Xie Signed-off-by: Josef Bacik --- fs/btrfs/transaction.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/btrfs/transaction.h') diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index 5f67fba07ab4..3c8e0d25c8e4 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h @@ -90,6 +90,7 @@ struct btrfs_pending_snapshot { struct btrfs_qgroup_inherit *inherit; /* block reservation for the operation */ struct btrfs_block_rsv block_rsv; + u64 qgroup_reserved; /* extra metadata reseration for relocation */ int error; bool readonly; -- cgit v1.2.3