summaryrefslogtreecommitdiff
path: root/fs/btrfs/file-item.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2024-04-30 01:23:04 +0300
committerDavid Sterba <dsterba@suse.com>2024-07-11 16:33:20 +0300
commit4aa7b5d1784f510c0f42afc1d74efb41947221d7 (patch)
treee66d699d1329137395cdf0ed22b79cbbf3c69e53 /fs/btrfs/file-item.c
parent3f255ece2f1e68d10f42050050b39b04d0376fb1 (diff)
downloadlinux-4aa7b5d1784f510c0f42afc1d74efb41947221d7.tar.xz
btrfs: remove extent_map::orig_start member
Since we have extent_map::offset, the old extent_map::orig_start is just extent_map::start - extent_map::offset for non-hole/inline extents. And since the new extent_map::offset is already verified by validate_extent_map() while the old orig_start is not, let's just remove the old member from all call sites. 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/file-item.c')
-rw-r--r--fs/btrfs/file-item.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 1298afea9503..06d23951901c 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -1293,8 +1293,6 @@ void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode,
type == BTRFS_FILE_EXTENT_PREALLOC) {
em->start = extent_start;
em->len = btrfs_file_extent_end(path) - extent_start;
- em->orig_start = extent_start -
- btrfs_file_extent_offset(leaf, fi);
bytenr = btrfs_file_extent_disk_bytenr(leaf, fi);
if (bytenr == 0) {
em->block_start = EXTENT_MAP_HOLE;
@@ -1327,10 +1325,9 @@ void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode,
em->len = fs_info->sectorsize;
em->offset = 0;
/*
- * Initialize orig_start and block_len with the same values
+ * Initialize block_len with the same values
* as in inode.c:btrfs_get_extent().
*/
- em->orig_start = EXTENT_MAP_HOLE;
em->block_len = (u64)-1;
extent_map_set_compression(em, compress_type);
} else {