Skip to content

Commit

Permalink
btrfs: pass reloc_control to relocate_data_extent()
Browse files Browse the repository at this point in the history
Pass a 'struct reloc_control' to relocate_data_extent() instead of
it's data_inode and file_extent_cluster separately.

Reviewed-by: Josef Bacik <[email protected]>
Signed-off-by: Johannes Thumshirn <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
morbidrsa authored and kdave committed Jul 11, 2024
1 parent 8b62f14 commit fa4adfc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fs/btrfs/relocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -3123,10 +3123,11 @@ static int relocate_file_extent_cluster(struct inode *inode,
return ret;
}

static noinline_for_stack int relocate_data_extent(struct inode *inode,
const struct btrfs_key *extent_key,
struct file_extent_cluster *cluster)
static noinline_for_stack int relocate_data_extent(struct reloc_control *rc,
const struct btrfs_key *extent_key)
{
struct inode *inode = rc->data_inode;
struct file_extent_cluster *cluster = &rc->cluster;
int ret;
struct btrfs_root *root = BTRFS_I(inode)->root;

Expand Down Expand Up @@ -3745,8 +3746,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)
if (rc->stage == MOVE_DATA_EXTENTS &&
(flags & BTRFS_EXTENT_FLAG_DATA)) {
rc->found_file_extent = true;
ret = relocate_data_extent(rc->data_inode,
&key, &rc->cluster);
ret = relocate_data_extent(rc, &key);
if (ret < 0) {
err = ret;
break;
Expand Down

0 comments on commit fa4adfc

Please sign in to comment.