Commit d846a6d3 authored by Filipe Manana's avatar Filipe Manana Committed by David Sterba
Browse files

btrfs: rename remaining exported extent map functions



Rename all the exported functions from extent_map.h that don't have a
'btrfs_' prefix in their names, so that they are consistent with all the
other functions, to make it clear they are btrfs specific functions and
to avoid potential name collisions in the future with functions defined
elsewhere in the kernel.

Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ae98ae2a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -501,7 +501,7 @@ static noinline int add_ra_bio_pages(struct inode *inode,
		page_end = (pg_index << PAGE_SHIFT) + folio_size(folio) - 1;
		btrfs_lock_extent(tree, cur, page_end, NULL);
		read_lock(&em_tree->lock);
		em = lookup_extent_mapping(em_tree, cur, page_end + 1 - cur);
		em = btrfs_lookup_extent_mapping(em_tree, cur, page_end + 1 - cur);
		read_unlock(&em_tree->lock);

		/*
@@ -581,7 +581,7 @@ void btrfs_submit_compressed_read(struct btrfs_bio *bbio)

	/* we need the actual starting offset of this extent in the file */
	read_lock(&em_tree->lock);
	em = lookup_extent_mapping(em_tree, file_offset, fs_info->sectorsize);
	em = btrfs_lookup_extent_mapping(em_tree, file_offset, fs_info->sectorsize);
	read_unlock(&em_tree->lock);
	if (!em) {
		ret = BLK_STS_IOERR;
+1 −1
Original line number Diff line number Diff line
@@ -753,7 +753,7 @@ static struct extent_map *defrag_lookup_extent(struct inode *inode, u64 start,
	 * full extent lock.
	 */
	read_lock(&em_tree->lock);
	em = lookup_extent_mapping(em_tree, start, sectorsize);
	em = btrfs_lookup_extent_mapping(em_tree, start, sectorsize);
	read_unlock(&em_tree->lock);

	/*
+3 −3
Original line number Diff line number Diff line
@@ -692,7 +692,7 @@ static int btrfs_extract_ordered_extent(struct btrfs_bio *bbio,
	 * a pre-existing one.
	 */
	if (!test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags)) {
		ret = split_extent_map(bbio->inode, bbio->file_offset,
		ret = btrfs_split_extent_map(bbio->inode, bbio->file_offset,
					     ordered->num_bytes, len,
					     ordered->disk_bytenr);
		if (ret)
+1 −1
Original line number Diff line number Diff line
@@ -1922,7 +1922,7 @@ static int btrfs_init_btree_inode(struct super_block *sb)

	btrfs_extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree,
				  IO_TREE_BTREE_INODE_IO);
	extent_map_tree_init(&BTRFS_I(inode)->extent_tree);
	btrfs_extent_map_tree_init(&BTRFS_I(inode)->extent_tree);

	BTRFS_I(inode)->root = btrfs_grab_root(fs_info->tree_root);
	set_bit(BTRFS_INODE_DUMMY, &BTRFS_I(inode)->runtime_flags);
+2 −2
Original line number Diff line number Diff line
@@ -2668,7 +2668,7 @@ bool try_release_extent_mapping(struct folio *folio, gfp_t mask)
		struct extent_map *em;

		write_lock(&extent_tree->lock);
		em = lookup_extent_mapping(extent_tree, start, len);
		em = btrfs_lookup_extent_mapping(extent_tree, start, len);
		if (!em) {
			write_unlock(&extent_tree->lock);
			break;
@@ -2707,7 +2707,7 @@ bool try_release_extent_mapping(struct folio *folio, gfp_t mask)
		 * fsync performance for workloads with a data size that exceeds
		 * or is close to the system's memory).
		 */
		remove_extent_mapping(inode, em);
		btrfs_remove_extent_mapping(inode, em);
		/* Once for the inode's extent map tree. */
		btrfs_free_extent_map(em);
next:
Loading