162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci#ifndef BTRFS_RELOCATION_H
462306a36Sopenharmony_ci#define BTRFS_RELOCATION_H
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciint btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start);
762306a36Sopenharmony_ciint btrfs_init_reloc_root(struct btrfs_trans_handle *trans, struct btrfs_root *root);
862306a36Sopenharmony_ciint btrfs_update_reloc_root(struct btrfs_trans_handle *trans,
962306a36Sopenharmony_ci			    struct btrfs_root *root);
1062306a36Sopenharmony_ciint btrfs_recover_relocation(struct btrfs_fs_info *fs_info);
1162306a36Sopenharmony_ciint btrfs_reloc_clone_csums(struct btrfs_ordered_extent *ordered);
1262306a36Sopenharmony_ciint btrfs_reloc_cow_block(struct btrfs_trans_handle *trans,
1362306a36Sopenharmony_ci			  struct btrfs_root *root, struct extent_buffer *buf,
1462306a36Sopenharmony_ci			  struct extent_buffer *cow);
1562306a36Sopenharmony_civoid btrfs_reloc_pre_snapshot(struct btrfs_pending_snapshot *pending,
1662306a36Sopenharmony_ci			      u64 *bytes_to_reserve);
1762306a36Sopenharmony_ciint btrfs_reloc_post_snapshot(struct btrfs_trans_handle *trans,
1862306a36Sopenharmony_ci			      struct btrfs_pending_snapshot *pending);
1962306a36Sopenharmony_ciint btrfs_should_cancel_balance(struct btrfs_fs_info *fs_info);
2062306a36Sopenharmony_cistruct btrfs_root *find_reloc_root(struct btrfs_fs_info *fs_info, u64 bytenr);
2162306a36Sopenharmony_ciint btrfs_should_ignore_reloc_root(struct btrfs_root *root);
2262306a36Sopenharmony_ciu64 btrfs_get_reloc_bg_bytenr(struct btrfs_fs_info *fs_info);
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#endif
25