summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent_map.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-05-24 17:03:17 +0200
committerDavid Sterba <dsterba@suse.com>2023-06-19 13:59:33 +0200
commitf000bc6fe43ce66c55fa1691000115b14ba95b33 (patch)
tree4840c87e4fb29c9315a4dfc787ec529d9d02c7f0 /fs/btrfs/extent_map.h
parent71df088c1cc090d232eb691d8f42284a2c6409eb (diff)
btrfs: pass the new logical address to split_extent_map
split_extent_map splits off the first chunk of an extent map into a new one. One of the two users is the zoned I/O completion code that wants to rewrite the logical block start address right after this split. Pass in the logical address to be set in the split off first extent_map as an argument to avoid an extra extent tree lookup for this case. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_map.h')
-rw-r--r--fs/btrfs/extent_map.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h
index 7df39112388d..35d27c756e08 100644
--- a/fs/btrfs/extent_map.h
+++ b/fs/btrfs/extent_map.h
@@ -90,7 +90,8 @@ struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,
int add_extent_mapping(struct extent_map_tree *tree,
struct extent_map *em, int modified);
void remove_extent_mapping(struct extent_map_tree *tree, struct extent_map *em);
-int split_extent_map(struct btrfs_inode *inode, u64 start, u64 len, u64 pre);
+int split_extent_map(struct btrfs_inode *inode, u64 start, u64 len, u64 pre,
+ u64 new_logical);
struct extent_map *alloc_extent_map(void);
void free_extent_map(struct extent_map *em);