diff options
author | Qu Wenruo <wqu@suse.com> | 2024-04-30 07:53:06 +0930 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-07-11 15:33:21 +0200 |
commit | c77a8c61002e91d859e118008fd495efbe1d9373 (patch) | |
tree | bdea6b735810f7e578aa2c34c54bd0adce08a25d /fs/btrfs/relocation.c | |
parent | e28b851ed9b232c3b84cb8d0fedbdfa8ca881386 (diff) |
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>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 68fe52ab445d..bcb665613e78 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2912,7 +2912,6 @@ static noinline_for_stack int setup_relocation_extent_mapping(struct inode *inod em->start = start; em->len = end + 1 - start; - em->block_start = block_start; em->disk_bytenr = block_start; em->disk_num_bytes = em->len; em->ram_bytes = em->len; |