diff options
author | Qu Wenruo <wqu@suse.com> | 2018-04-26 12:17:20 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 19:07:28 +0300 |
commit | 4ed0a7a3b7c3f8387caf2ad57424d9341f523856 (patch) | |
tree | c1264084da9a58e813cb2a6b9e3df6e5a8776a45 /fs/btrfs/scrub.c | |
parent | 3dca5c942dac60164e6a6e89172f25b86af07ce7 (diff) | |
download | linux-4ed0a7a3b7c3f8387caf2ad57424d9341f523856.tar.xz |
btrfs: trace: Add trace points for unused block groups
This patch will add the following trace events:
1) btrfs_remove_block_group
For btrfs_remove_block_group() function.
Triggered when a block group is really removed.
2) btrfs_add_unused_block_group
Triggered which block group is added to unused_bgs list.
3) btrfs_skip_unused_block_group
Triggered which unused block group is not deleted.
These trace events is pretty handy to debug case related to block group
auto remove.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r-- | fs/btrfs/scrub.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 52b39a0924e9..a59005862010 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -3984,6 +3984,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx, spin_lock(&fs_info->unused_bgs_lock); if (list_empty(&cache->bg_list)) { btrfs_get_block_group(cache); + trace_btrfs_add_unused_block_group(cache); list_add_tail(&cache->bg_list, &fs_info->unused_bgs); } |