aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/print-tree.h
diff options
context:
space:
mode:
authorGravatar Josef Bacik <josef@toxicpanda.com> 2020-09-03 14:29:51 -0400
committerGravatar David Sterba <dsterba@suse.com> 2020-10-07 12:12:20 +0200
commit457f1864b569c4a5d49046fb9a88ab82e108cdfd (patch)
treed18eaf54a07b758e727de76318b9314582fb43ca /fs/btrfs/print-tree.h
parentbtrfs: sysfs: export currently running exclusive operation (diff)
downloadlinux-457f1864b569c4a5d49046fb9a88ab82e108cdfd.tar.gz
linux-457f1864b569c4a5d49046fb9a88ab82e108cdfd.tar.bz2
linux-457f1864b569c4a5d49046fb9a88ab82e108cdfd.zip
btrfs: pretty print leaked root name
I'm a actual human being so am incapable of converting u64 to s64 in my head, so add a helper to get the pretty name of a root objectid and use that helper to spit out the name for any special roots for leaked roots, so I don't have to scratch my head and figure out which root I messed up the refs for. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/print-tree.h')
-rw-r--r--fs/btrfs/print-tree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/print-tree.h b/fs/btrfs/print-tree.h
index e6bb38fd75ad..78b99385a503 100644
--- a/fs/btrfs/print-tree.h
+++ b/fs/btrfs/print-tree.h
@@ -6,7 +6,11 @@
#ifndef BTRFS_PRINT_TREE_H
#define BTRFS_PRINT_TREE_H
+/* Buffer size to contain tree name and possibly additional data (offset) */
+#define BTRFS_ROOT_NAME_BUF_LEN 48
+
void btrfs_print_leaf(struct extent_buffer *l);
void btrfs_print_tree(struct extent_buffer *c, bool follow);
+const char *btrfs_root_name(u64 objectid, char *buf);
#endif