btrfs-progs: teach print_leaf about temporary item subtypes
authorDavid Sterba <dsterba@suse.com>
Tue, 1 Nov 2016 12:39:44 +0000 (13:39 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 9 Nov 2016 12:47:30 +0000 (13:47 +0100)
[ kernel patch 9f07e1d76eaeeddedcf9651395b4a8f870df31f0 ]
Signed-off-by: David Sterba <dsterba@suse.com>
print-tree.c

index 15eaaab..e347722 100644 (file)
@@ -1235,6 +1235,19 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
                                                objectid);
                        }
                        break;
+               case BTRFS_TEMPORARY_ITEM_KEY:
+                       printf("\t\ttemporary item objectid ");
+                       print_objectid(stdout, objectid, BTRFS_TEMPORARY_ITEM_KEY);
+                       printf(" offset %llu\n", (unsigned long long)offset);
+                       switch (objectid) {
+                       case BTRFS_BALANCE_OBJECTID:
+                               printf("\t\tbalance status\n");
+                               break;
+                       default:
+                               printf("\t\tunknown temporary item objectid %llu\n",
+                                               objectid);
+                       }
+                       break;
                };
                fflush(stdout);
        }