mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 05:24:12 +08:00
71008734d2
We're supposed to print the root_key.offset in btrfs_root_name in the
case of a reloc root, not the objectid. Fix this helper to take the key
so we have access to the offset when we need it.
Fixes: 457f1864b5
("btrfs: pretty print leaked root name")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
17 lines
456 B
C
17 lines
456 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2007 Oracle. All rights reserved.
|
|
*/
|
|
|
|
#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(const struct btrfs_key *key, char *buf);
|
|
|
|
#endif
|