mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
btrfs: tree-checker: Add EXTENT_DATA_REF check
EXTENT_DATA_REF is a little like DIR_ITEM which contains hash in its key->offset. This patch will check the following contents: - Key->objectid Basic alignment check. - Hash Hash of each extent_data_ref item must match key->offset. - Offset Basic alignment check. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
e2406a6f13
commit
0785a9aacf
3 changed files with 50 additions and 1 deletions
|
@ -438,7 +438,7 @@ int btrfs_get_extent_inline_ref_type(const struct extent_buffer *eb,
|
|||
return BTRFS_REF_TYPE_INVALID;
|
||||
}
|
||||
|
||||
static u64 hash_extent_data_ref(u64 root_objectid, u64 owner, u64 offset)
|
||||
u64 hash_extent_data_ref(u64 root_objectid, u64 owner, u64 offset)
|
||||
{
|
||||
u32 high_crc = ~(u32)0;
|
||||
u32 low_crc = ~(u32)0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue