diff options
author | Qu Wenruo <wqu@suse.com> | 2019-08-09 03:24:24 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-09-09 14:59:12 +0200 |
commit | 0785a9aacf9de9cd6a89a628b3b5d6b7e9ce5316 (patch) | |
tree | a751a9f57a0619023dd641f2f2d449dabeb70dbc /fs/btrfs/ctree.h | |
parent | btrfs: tree-checker: Add simple keyed refs check (diff) | |
download | linux-0785a9aacf9de9cd6a89a628b3b5d6b7e9ce5316.tar.xz linux-0785a9aacf9de9cd6a89a628b3b5d6b7e9ce5316.zip |
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>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index b161224b5a0b..20793742c9d3 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2447,6 +2447,7 @@ enum btrfs_inline_ref_type { int btrfs_get_extent_inline_ref_type(const struct extent_buffer *eb, struct btrfs_extent_inline_ref *iref, enum btrfs_inline_ref_type is_data); +u64 hash_extent_data_ref(u64 root_objectid, u64 owner, u64 offset); u64 btrfs_csum_bytes_to_leaves(struct btrfs_fs_info *fs_info, u64 csum_bytes); |