summaryrefslogtreecommitdiff
path: root/check/main.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2018-01-18 15:31:53 +0800
committerDavid Sterba <dsterba@suse.com>2018-02-02 16:01:58 +0100
commit96c6e1f0aa4c3fa23371d42b7e008f80faf1b471 (patch)
tree7495823d014383442dbcd5b53ebd79bd8c7a9490 /check/main.c
parent5c9ac8dc48e766b93ec99e35548e1c161b4ab92b (diff)
btrfs-progs: check: Export check global variables to check/common.h
There are a dozen of variables which are used as "check global" variables, like @total_csum_bytes or @no_holes. These variables are used freely across the check code, however since we're splitting check code, they need to be exported so they can be used in other files. This patch just export them and add declarations for them in check/common.h. Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'check/main.c')
-rw-r--r--check/main.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/check/main.c b/check/main.c
index cb3eef73..e87cd159 100644
--- a/check/main.c
+++ b/check/main.c
@@ -61,22 +61,22 @@ struct task_ctx {
struct task_info *info;
};
-static u64 bytes_used = 0;
-static u64 total_csum_bytes = 0;
-static u64 total_btree_bytes = 0;
-static u64 total_fs_tree_bytes = 0;
-static u64 total_extent_tree_bytes = 0;
-static u64 btree_space_waste = 0;
-static u64 data_bytes_allocated = 0;
-static u64 data_bytes_referenced = 0;
-static LIST_HEAD(duplicate_extents);
-static LIST_HEAD(delete_items);
-static int no_holes = 0;
-static int init_extent_tree = 0;
-static int check_data_csum = 0;
-static struct btrfs_fs_info *global_info;
-static struct task_ctx ctx = { 0 };
-static struct cache_tree *roots_info_cache = NULL;
+u64 bytes_used = 0;
+u64 total_csum_bytes = 0;
+u64 total_btree_bytes = 0;
+u64 total_fs_tree_bytes = 0;
+u64 total_extent_tree_bytes = 0;
+u64 btree_space_waste = 0;
+u64 data_bytes_allocated = 0;
+u64 data_bytes_referenced = 0;
+LIST_HEAD(duplicate_extents);
+LIST_HEAD(delete_items);
+int no_holes = 0;
+int init_extent_tree = 0;
+int check_data_csum = 0;
+struct btrfs_fs_info *global_info;
+struct task_ctx ctx = { 0 };
+struct cache_tree *roots_info_cache = NULL;
enum btrfs_check_mode {
CHECK_MODE_ORIGINAL,