Classes | |
| struct | BtrfsKey |
| struct | BtrfsItem |
| struct | BtrfsKeyPtr |
| struct | ChunkStripe |
| struct | ChunkMapEntry |
| struct | RootEntry |
| struct | InodeInfo |
| struct | DirEdge |
| struct | FileExtentInfo |
| struct | FsRootState |
Functions | |
| uint16_t | le16 (const unsigned char *p) |
| uint32_t | le32 (const unsigned char *p) |
| uint64_t | le64 (const unsigned char *p) |
| std::string | sanitize (const std::string &in) |
| std::string | to_hex (uint64_t v) |
| BtrfsKey | parse_key (const unsigned char *p) |
| bool | decompress_payload (const std::vector< unsigned char > &in, uint8_t compression, size_t expected_size, std::vector< unsigned char > &out) |
| uint8_t | gf_mul_byte (uint8_t a, uint8_t b) |
| uint8_t | gf_pow2 (size_t exp) |
| uint8_t | gf_inv_byte (uint8_t a) |
| uint32_t | crc32c_update (uint32_t crc, const unsigned char *data, size_t len) |
| bool | validate_tree_block_checksum (const std::vector< unsigned char > &block) |
| bool | validate_tree_block_header (const std::vector< unsigned char > &block, uint64_t logical_bytenr, uint32_t nodesize, const std::array< unsigned char, 16 > *fsid=nullptr, uint64_t max_generation=0) |
Variables | |
| constexpr uint8_t | BTRFS_INODE_ITEM_KEY = 1 |
| constexpr uint8_t | BTRFS_INODE_REF_KEY = 12 |
| constexpr uint8_t | BTRFS_DIR_ITEM_KEY = 84 |
| constexpr uint8_t | BTRFS_DIR_INDEX_KEY = 96 |
| constexpr uint8_t | BTRFS_EXTENT_DATA_KEY = 108 |
| constexpr uint8_t | BTRFS_ROOT_ITEM_KEY = 132 |
| constexpr uint8_t | BTRFS_ROOT_BACKREF_KEY = 144 |
| constexpr uint8_t | BTRFS_ROOT_REF_KEY = 156 |
| constexpr uint8_t | BTRFS_CHUNK_ITEM_KEY = 228 |
| constexpr uint8_t | BTRFS_FILE_EXTENT_INLINE = 0 |
| constexpr uint8_t | BTRFS_FILE_EXTENT_REG = 1 |
| constexpr uint8_t | BTRFS_FILE_EXTENT_PREALLOC = 2 |
| constexpr uint64_t | BTRFS_BLOCK_GROUP_RAID0 = 1ull << 3 |
| constexpr uint64_t | BTRFS_BLOCK_GROUP_RAID1 = 1ull << 4 |
| constexpr uint64_t | BTRFS_BLOCK_GROUP_DUP = 1ull << 5 |
| constexpr uint64_t | BTRFS_BLOCK_GROUP_RAID10 = 1ull << 6 |
| constexpr uint64_t | BTRFS_BLOCK_GROUP_RAID5 = 1ull << 7 |
| constexpr uint64_t | BTRFS_BLOCK_GROUP_RAID6 = 1ull << 8 |
| uint32_t anonymous_namespace{btrfs_recovery.cpp}::crc32c_update | ( | uint32_t | crc, |
| const unsigned char * | data, | ||
| size_t | len ) |
Definition at line 301 of file btrfs_recovery.cpp.
References crc32c_update().
Referenced by crc32c_update(), and validate_tree_block_checksum().
| bool anonymous_namespace{btrfs_recovery.cpp}::decompress_payload | ( | const std::vector< unsigned char > & | in, |
| uint8_t | compression, | ||
| size_t | expected_size, | ||
| std::vector< unsigned char > & | out ) |
Definition at line 182 of file btrfs_recovery.cpp.
References decompress_payload(), and le32().
Referenced by decompress_payload(), and BtrfsRecoveryImpl::render_extent().
| uint8_t anonymous_namespace{btrfs_recovery.cpp}::gf_inv_byte | ( | uint8_t | a | ) |
Definition at line 292 of file btrfs_recovery.cpp.
References gf_inv_byte(), and gf_mul_byte().
Referenced by gf_inv_byte(), and BtrfsRecoveryImpl::reconstruct_raid56_read().
| uint8_t anonymous_namespace{btrfs_recovery.cpp}::gf_mul_byte | ( | uint8_t | a, |
| uint8_t | b ) |
Definition at line 274 of file btrfs_recovery.cpp.
References gf_mul_byte().
Referenced by gf_inv_byte(), gf_mul_byte(), gf_pow2(), BtrfsRecoveryImpl::reconstruct_raid56_read(), and BtrfsRecoveryImpl::validate_raid6_candidate().
| uint8_t anonymous_namespace{btrfs_recovery.cpp}::gf_pow2 | ( | size_t | exp | ) |
Definition at line 286 of file btrfs_recovery.cpp.
References gf_mul_byte(), and gf_pow2().
Referenced by gf_pow2(), BtrfsRecoveryImpl::reconstruct_raid56_read(), and BtrfsRecoveryImpl::validate_raid6_candidate().
| uint16_t anonymous_namespace{btrfs_recovery.cpp}::le16 | ( | const unsigned char * | p | ) |
Definition at line 52 of file btrfs_recovery.cpp.
References le16().
Referenced by le16(), BtrfsRecoveryImpl::load_chunk_tree(), BtrfsRecoveryImpl::load_root_tree(), and BtrfsRecoveryImpl::parse_system_chunk_array().
| uint32_t anonymous_namespace{btrfs_recovery.cpp}::le32 | ( | const unsigned char * | p | ) |
Definition at line 56 of file btrfs_recovery.cpp.
References le32().
Referenced by decompress_payload(), le32(), BtrfsRecoveryImpl::recover(), validate_tree_block_checksum(), validate_tree_block_header(), and BtrfsRecoveryImpl::walk_tree_internal().
| uint64_t anonymous_namespace{btrfs_recovery.cpp}::le64 | ( | const unsigned char * | p | ) |
Definition at line 63 of file btrfs_recovery.cpp.
References le64().
Referenced by le64(), BtrfsRecoveryImpl::load_chunk_tree(), BtrfsRecoveryImpl::load_root_tree(), parse_key(), BtrfsRecoveryImpl::parse_system_chunk_array(), BtrfsRecoveryImpl::recover(), validate_tree_block_header(), and BtrfsRecoveryImpl::walk_tree_internal().
| BtrfsKey anonymous_namespace{btrfs_recovery.cpp}::parse_key | ( | const unsigned char * | p | ) |
Definition at line 156 of file btrfs_recovery.cpp.
References le64(), and parse_key().
Referenced by parse_key(), BtrfsRecoveryImpl::parse_system_chunk_array(), and BtrfsRecoveryImpl::walk_tree_internal().
| std::string anonymous_namespace{btrfs_recovery.cpp}::sanitize | ( | const std::string & | in | ) |
Definition at line 74 of file btrfs_recovery.cpp.
References sanitize(), and text_utils::sanitize_component().
Referenced by BtrfsRecoveryImpl::export_fs_root(), BtrfsRecoveryImpl::load_root_tree(), and sanitize().
| std::string anonymous_namespace{btrfs_recovery.cpp}::to_hex | ( | uint64_t | v | ) |
Definition at line 83 of file btrfs_recovery.cpp.
References to_hex().
Referenced by BtrfsRecoveryImpl::recover(), and to_hex().
| bool anonymous_namespace{btrfs_recovery.cpp}::validate_tree_block_checksum | ( | const std::vector< unsigned char > & | block | ) |
Definition at line 317 of file btrfs_recovery.cpp.
References crc32c_update(), le32(), and validate_tree_block_checksum().
Referenced by validate_tree_block_checksum(), and validate_tree_block_header().
| bool anonymous_namespace{btrfs_recovery.cpp}::validate_tree_block_header | ( | const std::vector< unsigned char > & | block, |
| uint64_t | logical_bytenr, | ||
| uint32_t | nodesize, | ||
| const std::array< unsigned char, 16 > * | fsid = nullptr, | ||
| uint64_t | max_generation = 0 ) |
Definition at line 324 of file btrfs_recovery.cpp.
References le32(), le64(), validate_tree_block_checksum(), and validate_tree_block_header().
Referenced by BtrfsRecoveryImpl::read_tree_block(), and validate_tree_block_header().
|
constexpr |
Definition at line 47 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::logical_to_physical().
|
constexpr |
Definition at line 45 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::logical_to_physical().
|
constexpr |
Definition at line 46 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::logical_to_physical().
|
constexpr |
Definition at line 48 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::logical_to_physical().
|
constexpr |
Definition at line 49 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::logical_to_physical(), BtrfsRecoveryImpl::read_tree_block(), and BtrfsRecoveryImpl::reconstruct_raid56_read().
|
constexpr |
Definition at line 50 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::logical_to_physical(), BtrfsRecoveryImpl::read_tree_block(), and BtrfsRecoveryImpl::reconstruct_raid56_read().
|
constexpr |
Definition at line 39 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::load_chunk_tree(), and BtrfsRecoveryImpl::parse_system_chunk_array().
|
constexpr |
Definition at line 34 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::collect_fs_root().
|
constexpr |
Definition at line 33 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::collect_fs_root().
|
constexpr |
Definition at line 35 of file btrfs_recovery.cpp.
|
constexpr |
Definition at line 41 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::render_extent().
|
constexpr |
Definition at line 43 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::render_extent().
|
constexpr |
Definition at line 42 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::render_extent().
|
constexpr |
Definition at line 31 of file btrfs_recovery.cpp.
|
constexpr |
Definition at line 32 of file btrfs_recovery.cpp.
|
constexpr |
Definition at line 37 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::load_root_tree().
|
constexpr |
Definition at line 36 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::load_root_tree().
|
constexpr |
Definition at line 38 of file btrfs_recovery.cpp.
Referenced by BtrfsRecoveryImpl::load_root_tree().