2007-06-12 21:07:11 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 Oracle. All rights reserved.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public
|
|
|
|
* License v2 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public
|
|
|
|
* License along with this program; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 021110-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2015-01-22 00:49:26 +08:00
|
|
|
#ifndef __PRINT_TREE_H__
|
|
|
|
#define __PRINT_TREE_H__
|
|
|
|
|
2021-06-03 04:34:44 +08:00
|
|
|
enum {
|
|
|
|
/* Depth-first search, nodes and leaves can be interleaved */
|
|
|
|
BTRFS_PRINT_TREE_DFS = (1 << 0),
|
|
|
|
/* Breadth-first search, first nodes, then leaves */
|
|
|
|
BTRFS_PRINT_TREE_BFS = (1 << 1),
|
|
|
|
/* Follow to child nodes */
|
|
|
|
BTRFS_PRINT_TREE_FOLLOW = (1 << 2),
|
2021-06-03 03:59:48 +08:00
|
|
|
/* Print checksum of node/leaf */
|
|
|
|
BTRFS_PRINT_TREE_CSUM_HEADERS = (1 << 3),
|
|
|
|
/* Print checksums in checksum items */
|
|
|
|
BTRFS_PRINT_TREE_CSUM_ITEMS = (1 << 4),
|
2021-06-03 04:34:44 +08:00
|
|
|
BTRFS_PRINT_TREE_DEFAULT = BTRFS_PRINT_TREE_BFS,
|
|
|
|
};
|
|
|
|
|
|
|
|
void btrfs_print_tree(struct extent_buffer *eb, unsigned int mode);
|
2021-06-03 03:59:48 +08:00
|
|
|
void btrfs_print_leaf(struct extent_buffer *eb, unsigned int mode);
|
2018-09-28 09:44:34 +08:00
|
|
|
|
2009-06-04 00:02:23 +08:00
|
|
|
void btrfs_print_key(struct btrfs_disk_key *disk_key);
|
2017-08-31 22:34:15 +08:00
|
|
|
void print_chunk_item(struct extent_buffer *eb, struct btrfs_chunk *chunk);
|
2014-05-08 04:07:17 +08:00
|
|
|
void print_extent_item(struct extent_buffer *eb, int slot, int metadata);
|
2016-08-29 16:08:59 +08:00
|
|
|
void print_objectid(FILE *stream, u64 objectid, u8 type);
|
2016-08-29 16:09:00 +08:00
|
|
|
void print_key_type(FILE *stream, u64 objectid, u8 type);
|
2020-05-27 18:28:06 +08:00
|
|
|
void btrfs_print_superblock(struct btrfs_super_block *sb, int full);
|
2021-06-03 04:34:44 +08:00
|
|
|
|
2007-03-17 04:20:31 +08:00
|
|
|
#endif
|