diff --git a/cmds-check.c b/cmds-check.c index 2318aed5..2d5162c8 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -3931,9 +3931,12 @@ static int record_extent(struct btrfs_trans_handle *trans, bi = (struct btrfs_tree_block_info *)(ei + 1); memset_extent_buffer(leaf, 0, (unsigned long)bi, sizeof(*bi)); - memset(©_key, 0, sizeof(copy_key)); - copy_key.objectid = le64_to_cpu(rec->info_objectid); + btrfs_set_disk_key_objectid(©_key, + rec->info_objectid); + btrfs_set_disk_key_type(©_key, 0); + btrfs_set_disk_key_offset(©_key, 0); + btrfs_set_tree_block_level(leaf, bi, rec->info_level); btrfs_set_tree_block_key(leaf, bi, ©_key);