Btrfs: noinline merge_extent_mapping
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 5 Jan 2018 19:51:17 +0000 (12:51 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:22 +0000 (16:08 +0100)
In order to debug subtle bugs around merge_extent_mapping(), perf probe
can be used to check the arguments, but sometimes merge_extent_mapping()
got inlined by compiler and couldn't be probed.

This is adding noinline attribute to 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>
fs/btrfs/extent_map.c

index 914662428dbd434f4ffc7c7a84b0720a1308e0bb..d3bd02105d1c47ef182c9533f94285eb1d560533 100644 (file)
@@ -480,10 +480,10 @@ static struct extent_map *prev_extent_map(struct extent_map *em)
  * and an extent that you want to insert, deal with overlap and insert
  * the best fitted new extent into the tree.
  */
-static int merge_extent_mapping(struct extent_map_tree *em_tree,
-                               struct extent_map *existing,
-                               struct extent_map *em,
-                               u64 map_start)
+static noinline int merge_extent_mapping(struct extent_map_tree *em_tree,
+                                        struct extent_map *existing,
+                                        struct extent_map *em,
+                                        u64 map_start)
 {
        struct extent_map *prev;
        struct extent_map *next;