Btrfs: Add block group pinned accounting back

This patch adds a helper function 'update_pinned_extents' to
extent-tree.c. The usage of the helper function is similar to
'update_block_group',  the last parameter of the function indicates
pin vs unpin.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Yan
2007-11-16 14:57:08 -05:00
committed by Chris Mason
parent 5103e947b9
commit 324ae4df00
3 changed files with 44 additions and 16 deletions

View File

@@ -569,6 +569,7 @@ struct btrfs_root *open_ctree(struct super_block *sb)
fs_info->btree_inode->i_mapping, GFP_NOFS);
fs_info->do_barriers = 1;
fs_info->closing = 0;
fs_info->total_pinned = 0;
INIT_DELAYED_WORK(&fs_info->trans_work, btrfs_transaction_cleaner);
BTRFS_I(fs_info->btree_inode)->root = tree_root;