linux/fs/btrfs/tests
Qu Wenruo c77a8c6100 btrfs: remove extent_map::block_start member
The member extent_map::block_start can be calculated from
extent_map::disk_bytenr + extent_map::offset for regular extents.
And otherwise just extent_map::disk_bytenr.

And this is already validated by the validate_extent_map().  Now we can
remove the member.

However there is a special case in btrfs_create_dio_extent() where we
for NOCOW/PREALLOC ordered extents cannot directly use the resulting
btrfs_file_extent, as btrfs_split_ordered_extent() cannot handle them
yet.

So for that call site, we pass file_extent->disk_bytenr +
file_extent->num_bytes as disk_bytenr for the ordered extent, and 0 for
offset.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-11 15:33:21 +02:00
..
btrfs-tests.c btrfs: remove objectid from struct btrfs_inode on 64 bits platforms 2024-07-11 15:33:17 +02:00
btrfs-tests.h btrfs: use a dedicated data structure for chunk maps 2023-12-15 20:27:02 +01:00
extent-buffer-tests.c btrfs: abort transaction on generation mismatch when marking eb as dirty 2023-10-12 16:44:07 +02:00
extent-io-tests.c btrfs: tests: allocate dummy fs_info and root in test_find_delalloc() 2024-03-04 16:24:49 +01:00
extent-map-tests.c btrfs: remove extent_map::block_start member 2024-07-11 15:33:21 +02:00
free-space-tests.c btrfs: remove use btrfs_remove_free_space_cache instead of variant 2022-09-26 12:27:58 +02:00
free-space-tree-tests.c btrfs: convert btrfs_block_group::needs_free_space to runtime flag 2022-12-05 18:00:51 +01:00
inode-tests.c btrfs: remove extent_map::block_start member 2024-07-11 15:33:21 +02:00
qgroup-tests.c btrfs: use a structure to pass arguments to backref walking functions 2022-12-05 18:00:50 +01:00