summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2019-06-20 15:38:04 -0400
committerDavid Sterba <dsterba@suse.com>2019-09-09 08:59:09 -0400
commit07730d87ac7872b54efa02da5d20b42fd6bb165a (patch)
treebc1f9b69ef68cf9fc6eb689820e2d30460c483b3 /fs/btrfs/ctree.h
parent606d1bf10d7ebafdee26e8896b467b885c5233ec (diff)
btrfs: migrate the chunk allocation code
This feels more at home in block-group.c than in extent-tree.c. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com>i [ refresh ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 6b17573c2fe6..fe25b7211f2d 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2556,28 +2556,6 @@ enum btrfs_flush_state {
2556 COMMIT_TRANS = 9, 2556 COMMIT_TRANS = 9,
2557}; 2557};
2558 2558
2559/*
2560 * control flags for do_chunk_alloc's force field
2561 * CHUNK_ALLOC_NO_FORCE means to only allocate a chunk
2562 * if we really need one.
2563 *
2564 * CHUNK_ALLOC_LIMITED means to only try and allocate one
2565 * if we have very few chunks already allocated. This is
2566 * used as part of the clustering code to help make sure
2567 * we have a good pool of storage to cluster in, without
2568 * filling the FS with empty chunks
2569 *
2570 * CHUNK_ALLOC_FORCE means it must try to allocate one
2571 *
2572 */
2573enum btrfs_chunk_alloc_enum {
2574 CHUNK_ALLOC_NO_FORCE,
2575 CHUNK_ALLOC_LIMITED,
2576 CHUNK_ALLOC_FORCE,
2577};
2578
2579int btrfs_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags,
2580 enum btrfs_chunk_alloc_enum force);
2581int btrfs_subvolume_reserve_metadata(struct btrfs_root *root, 2559int btrfs_subvolume_reserve_metadata(struct btrfs_root *root,
2582 struct btrfs_block_rsv *rsv, 2560 struct btrfs_block_rsv *rsv,
2583 int nitems, bool use_global_rsv); 2561 int nitems, bool use_global_rsv);
@@ -2593,7 +2571,6 @@ int btrfs_error_unpin_extent_range(struct btrfs_fs_info *fs_info,
2593 u64 start, u64 end); 2571 u64 start, u64 end);
2594int btrfs_discard_extent(struct btrfs_fs_info *fs_info, u64 bytenr, 2572int btrfs_discard_extent(struct btrfs_fs_info *fs_info, u64 bytenr,
2595 u64 num_bytes, u64 *actual_bytes); 2573 u64 num_bytes, u64 *actual_bytes);
2596int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans, u64 type);
2597int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range); 2574int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range);
2598 2575
2599int btrfs_init_space_info(struct btrfs_fs_info *fs_info); 2576int btrfs_init_space_info(struct btrfs_fs_info *fs_info);
@@ -2602,7 +2579,6 @@ int btrfs_delayed_refs_qgroup_accounting(struct btrfs_trans_handle *trans,
2602int btrfs_start_write_no_snapshotting(struct btrfs_root *root); 2579int btrfs_start_write_no_snapshotting(struct btrfs_root *root);
2603void btrfs_end_write_no_snapshotting(struct btrfs_root *root); 2580void btrfs_end_write_no_snapshotting(struct btrfs_root *root);
2604void btrfs_wait_for_snapshot_creation(struct btrfs_root *root); 2581void btrfs_wait_for_snapshot_creation(struct btrfs_root *root);
2605void check_system_chunk(struct btrfs_trans_handle *trans, const u64 type);
2606 2582
2607/* ctree.c */ 2583/* ctree.c */
2608int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key, 2584int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key,