diff options
author | Josef Bacik <jbacik@fb.com> | 2016-03-25 13:25:52 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-07 12:45:53 -0400 |
commit | c83f8effefa46c15f2fd43de598d9839d0056096 (patch) | |
tree | c94b37edea283c007446965fb5ea4bd8d7158b63 /fs/btrfs | |
parent | d555b6c380c644af63dbdaa7cc14bba041a4e4dd (diff) |
Btrfs: add tracepoint for adding block groups
I'm writing a tool to visualize the enospc system inside btrfs, I need this
tracepoint in order to keep track of the block groups in the system. Thanks,
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index a1355a33e7e9..aae7b04afa9f 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -9994,6 +9994,7 @@ int btrfs_read_block_groups(struct btrfs_root *root) | |||
9994 | goto error; | 9994 | goto error; |
9995 | } | 9995 | } |
9996 | 9996 | ||
9997 | trace_btrfs_add_block_group(root->fs_info, cache, 0); | ||
9997 | ret = update_space_info(info, cache->flags, found_key.offset, | 9998 | ret = update_space_info(info, cache->flags, found_key.offset, |
9998 | btrfs_block_group_used(&cache->item), | 9999 | btrfs_block_group_used(&cache->item), |
9999 | cache->bytes_super, &space_info); | 10000 | cache->bytes_super, &space_info); |
@@ -10164,6 +10165,7 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans, | |||
10164 | * Now that our block group has its ->space_info set and is inserted in | 10165 | * Now that our block group has its ->space_info set and is inserted in |
10165 | * the rbtree, update the space info's counters. | 10166 | * the rbtree, update the space info's counters. |
10166 | */ | 10167 | */ |
10168 | trace_btrfs_add_block_group(root->fs_info, cache, 1); | ||
10167 | ret = update_space_info(root->fs_info, cache->flags, size, bytes_used, | 10169 | ret = update_space_info(root->fs_info, cache->flags, size, bytes_used, |
10168 | cache->bytes_super, &cache->space_info); | 10170 | cache->bytes_super, &cache->space_info); |
10169 | if (ret) { | 10171 | if (ret) { |