btrfs: move dev-replace prototypes into dev-replace.h
authorJosef Bacik <josef@toxicpanda.com>
Wed, 26 Oct 2022 19:08:36 +0000 (15:08 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:47 +0000 (18:00 +0100)
We already have a dev-replace.h, simply move these prototypes and
helpers into dev-replace.h where they belong.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/dev-replace.h
fs/btrfs/extent_io.c

index f3facc10646c61e8d2b02b1f99291cd7f328b65f..84bc33ff003f2e2f3ef460c265f91271d688ad50 100644 (file)
@@ -732,15 +732,6 @@ static inline unsigned long get_eb_page_index(unsigned long offset)
 #define EXPORT_FOR_TESTS
 #endif
 
-/* dev-replace.c */
-void btrfs_bio_counter_inc_blocked(struct btrfs_fs_info *fs_info);
-void btrfs_bio_counter_sub(struct btrfs_fs_info *fs_info, s64 amount);
-
-static inline void btrfs_bio_counter_dec(struct btrfs_fs_info *fs_info)
-{
-       btrfs_bio_counter_sub(fs_info, 1);
-}
-
 static inline int is_fstree(u64 rootid)
 {
        if (rootid == BTRFS_FS_TREE_OBJECTID ||
index 6084b313056a75a9881c8e494c7c611c0673433f..675082ccec89f84de417ba4b620a825ef73dfac5 100644 (file)
@@ -25,5 +25,13 @@ int __pure btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace);
 bool btrfs_finish_block_group_to_copy(struct btrfs_device *srcdev,
                                      struct btrfs_block_group *cache,
                                      u64 physical);
+void btrfs_bio_counter_inc_blocked(struct btrfs_fs_info *fs_info);
+void btrfs_bio_counter_sub(struct btrfs_fs_info *fs_info, s64 amount);
+
+static inline void btrfs_bio_counter_dec(struct btrfs_fs_info *fs_info)
+{
+       btrfs_bio_counter_sub(fs_info, 1);
+}
+
 
 #endif
index 7fe637408e986f2c16bbcca259e3867c898c7a0b..6373b15652503995fd5dae6fc7b01ecf03258171 100644 (file)
@@ -34,6 +34,7 @@
 #include "accessors.h"
 #include "file-item.h"
 #include "file.h"
+#include "dev-replace.h"
 
 static struct kmem_cache *extent_buffer_cache;