Btrfs: parse parent 0 into correct value in tracepoint
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 30 Nov 2012 11:24:22 +0000 (11:24 +0000)
committerChris Mason <chris.mason@fusionio.com>
Mon, 17 Dec 2012 01:46:18 +0000 (20:46 -0500)
Value 0 is not a tree id, so besides an upper limit, a lower limit is
necessary as well while parsing root types of tracepoint.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
include/trace/events/btrfs.h

index 54fab041b22ab7a5102879a1b82ac5b4f97966df..ea546a4e9609aa0f9c9b56a6f307e06b10602fe6 100644 (file)
@@ -45,7 +45,8 @@ struct extent_buffer;
 
 #define show_root_type(obj)                                            \
        obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) ||                \
-             (obj <= BTRFS_CSUM_TREE_OBJECTID )) ? __show_root_type(obj) : "-"
+             (obj >= BTRFS_ROOT_TREE_OBJECTID &&                       \
+              obj <= BTRFS_CSUM_TREE_OBJECTID)) ? __show_root_type(obj) : "-"
 
 #define BTRFS_GROUP_FLAGS      \
        { BTRFS_BLOCK_GROUP_DATA,       "DATA"}, \