btrfs: teach print_leaf about permanent item subtypes
authorDavid Sterba <dsterba@suse.com>
Mon, 25 Jan 2016 17:44:13 +0000 (18:44 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Feb 2016 15:15:43 +0000 (16:15 +0100)
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/print-tree.c

index 647ab12fdf5dbcb397e93ee8a958968b2d83ab1e..7bd0bdfc9812234762e6249b305d6bbc9d06f830 100644 (file)
@@ -295,8 +295,16 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
                               btrfs_dev_extent_chunk_offset(l, dev_extent),
                               btrfs_dev_extent_length(l, dev_extent));
                        break;
-               case BTRFS_DEV_STATS_KEY:
-                       printk(KERN_INFO "\t\tdevice stats\n");
+               case BTRFS_PERSISTENT_ITEM_KEY:
+                       printk(KERN_INFO "\t\tpersistent item objectid %llu offset %llu\n",
+                                       key.objectid, key.offset);
+                       switch (key.objectid) {
+                       case BTRFS_DEV_STATS_OBJECTID:
+                               printk(KERN_INFO "\t\tdevice stats\n");
+                               break;
+                       default:
+                               printk(KERN_INFO "\t\tunknown persistent item\n");
+                       }
                        break;
                case BTRFS_DEV_REPLACE_KEY:
                        printk(KERN_INFO "\t\tdev replace\n");