167707479SJosef Bacik /* SPDX-License-Identifier: GPL-2.0 */ 267707479SJosef Bacik 367707479SJosef Bacik #ifndef BTRFS_RELOCATION_H 467707479SJosef Bacik #define BTRFS_RELOCATION_H 567707479SJosef Bacik 667707479SJosef Bacik int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start); 767707479SJosef Bacik int btrfs_init_reloc_root(struct btrfs_trans_handle *trans, struct btrfs_root *root); 867707479SJosef Bacik int btrfs_update_reloc_root(struct btrfs_trans_handle *trans, 967707479SJosef Bacik struct btrfs_root *root); 1067707479SJosef Bacik int btrfs_recover_relocation(struct btrfs_fs_info *fs_info); 11*34bfaf15SChristoph Hellwig int btrfs_reloc_clone_csums(struct btrfs_ordered_extent *ordered); 1267707479SJosef Bacik int btrfs_reloc_cow_block(struct btrfs_trans_handle *trans, 1367707479SJosef Bacik struct btrfs_root *root, struct extent_buffer *buf, 1467707479SJosef Bacik struct extent_buffer *cow); 1567707479SJosef Bacik void btrfs_reloc_pre_snapshot(struct btrfs_pending_snapshot *pending, 1667707479SJosef Bacik u64 *bytes_to_reserve); 1767707479SJosef Bacik int btrfs_reloc_post_snapshot(struct btrfs_trans_handle *trans, 1867707479SJosef Bacik struct btrfs_pending_snapshot *pending); 1967707479SJosef Bacik int btrfs_should_cancel_balance(struct btrfs_fs_info *fs_info); 2067707479SJosef Bacik struct btrfs_root *find_reloc_root(struct btrfs_fs_info *fs_info, u64 bytenr); 2167707479SJosef Bacik int btrfs_should_ignore_reloc_root(struct btrfs_root *root); 22b9a9a850SQu Wenruo u64 btrfs_get_reloc_bg_bytenr(struct btrfs_fs_info *fs_info); 2367707479SJosef Bacik 2467707479SJosef Bacik #endif 25