Commit bb7b05fe authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David Sterba
Browse files

btrfs: rename cow_file_range_async to run_delalloc_compressed



cow_file_range_async is only used for compressed writeback.  Rename it
to run_delalloc_compressed, which also fits in with run_delalloc_nocow
and run_delalloc_zoned.

Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 973fb26e
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -1693,7 +1693,7 @@ static noinline void async_cow_submit(struct btrfs_work *work)
	 * ->inode could be NULL if async_chunk_start has failed to compress,
	 * in which case we don't have anything to submit, yet we need to
	 * always adjust ->async_delalloc_pages as its paired with the init
	 * happening in cow_file_range_async
	 * happening in run_delalloc_compressed
	 */
	if (async_chunk->inode)
		submit_compressed_extents(async_chunk);
@@ -1720,7 +1720,7 @@ static noinline void async_cow_free(struct btrfs_work *work)
		kvfree(async_cow);
}

static bool cow_file_range_async(struct btrfs_inode *inode,
static bool run_delalloc_compressed(struct btrfs_inode *inode,
				    struct writeback_control *wbc,
				    struct page *locked_page,
				    u64 start, u64 end, int *page_started,
@@ -2417,7 +2417,7 @@ int btrfs_run_delalloc_range(struct btrfs_inode *inode, struct page *locked_page

	if (btrfs_inode_can_compress(inode) &&
	    inode_need_compress(inode, start, end) &&
	    cow_file_range_async(inode, wbc, locked_page, start,
	    run_delalloc_compressed(inode, wbc, locked_page, start,
				    end, page_started, nr_written))
		goto out;