162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci#ifndef BTRFS_ROOT_TREE_H 462306a36Sopenharmony_ci#define BTRFS_ROOT_TREE_H 562306a36Sopenharmony_ci 662306a36Sopenharmony_ciint btrfs_subvolume_reserve_metadata(struct btrfs_root *root, 762306a36Sopenharmony_ci struct btrfs_block_rsv *rsv, 862306a36Sopenharmony_ci int nitems, bool use_global_rsv); 962306a36Sopenharmony_civoid btrfs_subvolume_release_metadata(struct btrfs_root *root, 1062306a36Sopenharmony_ci struct btrfs_block_rsv *rsv); 1162306a36Sopenharmony_ciint btrfs_add_root_ref(struct btrfs_trans_handle *trans, u64 root_id, 1262306a36Sopenharmony_ci u64 ref_id, u64 dirid, u64 sequence, 1362306a36Sopenharmony_ci const struct fscrypt_str *name); 1462306a36Sopenharmony_ciint btrfs_del_root_ref(struct btrfs_trans_handle *trans, u64 root_id, 1562306a36Sopenharmony_ci u64 ref_id, u64 dirid, u64 *sequence, 1662306a36Sopenharmony_ci const struct fscrypt_str *name); 1762306a36Sopenharmony_ciint btrfs_del_root(struct btrfs_trans_handle *trans, const struct btrfs_key *key); 1862306a36Sopenharmony_ciint btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, 1962306a36Sopenharmony_ci const struct btrfs_key *key, 2062306a36Sopenharmony_ci struct btrfs_root_item *item); 2162306a36Sopenharmony_ciint __must_check btrfs_update_root(struct btrfs_trans_handle *trans, 2262306a36Sopenharmony_ci struct btrfs_root *root, 2362306a36Sopenharmony_ci struct btrfs_key *key, 2462306a36Sopenharmony_ci struct btrfs_root_item *item); 2562306a36Sopenharmony_ciint btrfs_find_root(struct btrfs_root *root, const struct btrfs_key *search_key, 2662306a36Sopenharmony_ci struct btrfs_path *path, struct btrfs_root_item *root_item, 2762306a36Sopenharmony_ci struct btrfs_key *root_key); 2862306a36Sopenharmony_ciint btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info); 2962306a36Sopenharmony_civoid btrfs_set_root_node(struct btrfs_root_item *item, 3062306a36Sopenharmony_ci struct extent_buffer *node); 3162306a36Sopenharmony_civoid btrfs_check_and_init_root_item(struct btrfs_root_item *item); 3262306a36Sopenharmony_civoid btrfs_update_root_times(struct btrfs_trans_handle *trans, struct btrfs_root *root); 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci#endif 35