relocation.c (9270501c163b67f48fd5fb2f98b1b48d6530f460) relocation.c (29cbcf401793f4e2c871c846edc2191731df2c41)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2009 Oracle. All rights reserved.
4 */
5
6#include <linux/sched.h>
7#include <linux/pagemap.h>
8#include <linux/writeback.h>

--- 3950 unchanged lines hidden (view full) ---

3959}
3960
3961/*
3962 * function to relocate all extents in a block group.
3963 */
3964int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start)
3965{
3966 struct btrfs_block_group *bg;
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2009 Oracle. All rights reserved.
4 */
5
6#include <linux/sched.h>
7#include <linux/pagemap.h>
8#include <linux/writeback.h>

--- 3950 unchanged lines hidden (view full) ---

3959}
3960
3961/*
3962 * function to relocate all extents in a block group.
3963 */
3964int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start)
3965{
3966 struct btrfs_block_group *bg;
3967 struct btrfs_root *extent_root = fs_info->extent_root;
3967 struct btrfs_root *extent_root = btrfs_extent_root(fs_info, group_start);
3968 struct reloc_control *rc;
3969 struct inode *inode;
3970 struct btrfs_path *path;
3971 int ret;
3972 int rw = 0;
3973 int err = 0;
3974
3975 bg = btrfs_lookup_block_group(fs_info, group_start);

--- 234 unchanged lines hidden (view full) ---

4210 }
4211
4212 ret = reloc_chunk_start(fs_info);
4213 if (ret < 0) {
4214 err = ret;
4215 goto out_end;
4216 }
4217
3968 struct reloc_control *rc;
3969 struct inode *inode;
3970 struct btrfs_path *path;
3971 int ret;
3972 int rw = 0;
3973 int err = 0;
3974
3975 bg = btrfs_lookup_block_group(fs_info, group_start);

--- 234 unchanged lines hidden (view full) ---

4210 }
4211
4212 ret = reloc_chunk_start(fs_info);
4213 if (ret < 0) {
4214 err = ret;
4215 goto out_end;
4216 }
4217
4218 rc->extent_root = fs_info->extent_root;
4218 rc->extent_root = btrfs_extent_root(fs_info, 0);
4219
4220 set_reloc_control(rc);
4221
4222 trans = btrfs_join_transaction(rc->extent_root);
4223 if (IS_ERR(trans)) {
4224 err = PTR_ERR(trans);
4225 goto out_unset;
4226 }

--- 258 unchanged lines hidden ---
4219
4220 set_reloc_control(rc);
4221
4222 trans = btrfs_join_transaction(rc->extent_root);
4223 if (IS_ERR(trans)) {
4224 err = PTR_ERR(trans);
4225 goto out_unset;
4226 }

--- 258 unchanged lines hidden ---