Btrfs: add tracepoint for em's EEXIST case

This is adding a tracepoint 'btrfs_handle_em_exist' to help debug the
subtle bugs around merge_extent_mapping.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Liu Bo 2018-01-05 12:51:16 -07:00 committed by David Sterba
parent 5d23515be6
commit 393da91819
2 changed files with 38 additions and 0 deletions

View file

@ -551,6 +551,9 @@ int btrfs_add_extent_mapping(struct extent_map_tree *em_tree,
ret = 0;
existing = search_extent_mapping(em_tree, start, len);
trace_btrfs_handle_em_exist(existing, em, start, len);
/*
* existing will always be non-NULL, since there must be
* extent causing the -EEXIST.