diff options
author | Josef Bacik <jbacik@fb.com> | 2016-03-25 13:25:52 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-07 18:45:53 +0200 |
commit | c83f8effefa46c15f2fd43de598d9839d0056096 (patch) | |
tree | c94b37edea283c007446965fb5ea4bd8d7158b63 /fs | |
parent | d555b6c380c644af63dbdaa7cc14bba041a4e4dd (diff) | |
download | op-kernel-dev-c83f8effefa46c15f2fd43de598d9839d0056096.zip op-kernel-dev-c83f8effefa46c15f2fd43de598d9839d0056096.tar.gz |
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')
-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 a1355a3..aae7b04 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) goto error; } + trace_btrfs_add_block_group(root->fs_info, cache, 0); ret = update_space_info(info, cache->flags, found_key.offset, btrfs_block_group_used(&cache->item), cache->bytes_super, &space_info); @@ -10164,6 +10165,7 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans, * Now that our block group has its ->space_info set and is inserted in * the rbtree, update the space info's counters. */ + trace_btrfs_add_block_group(root->fs_info, cache, 1); ret = update_space_info(root->fs_info, cache->flags, size, bytes_used, cache->bytes_super, &cache->space_info); if (ret) { |