btrfs: move struct io_ctl to free-space-cache.h
authorDavid Sterba <dsterba@suse.com>
Wed, 21 Aug 2019 17:57:04 +0000 (19:57 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:15 +0000 (14:59 +0200)
The io_ctl structure is used for free space management, and used only by
the v1 space cache code, but unfortunatlly the full definition is
required by block-group.h so it can't be moved to free-space-cache.c
without additional changes.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.h
fs/btrfs/ctree.h
fs/btrfs/free-space-cache.h

index 5c6e2fb23e352794311d55d0d8adb6f50e48ec7d..c391800388ddaaae8875d7f80ac58406c1b3767a 100644 (file)
@@ -3,6 +3,8 @@
 #ifndef BTRFS_BLOCK_GROUP_H
 #define BTRFS_BLOCK_GROUP_H
 
+#include "free-space-cache.h"
+
 enum btrfs_disk_cache_state {
        BTRFS_DC_WRITTEN,
        BTRFS_DC_ERROR,
index 17cd88521ad2c358e5a2b66c4bc7b52d012e7918..0b6eca746fd4923e1f02756668d49002f41c9117 100644 (file)
@@ -434,20 +434,6 @@ enum btrfs_caching_type {
        BTRFS_CACHE_ERROR,
 };
 
-struct btrfs_io_ctl {
-       void *cur, *orig;
-       struct page *page;
-       struct page **pages;
-       struct btrfs_fs_info *fs_info;
-       struct inode *inode;
-       unsigned long size;
-       int index;
-       int num_pages;
-       int entries;
-       int bitmaps;
-       unsigned check_crcs:1;
-};
-
 /*
  * Tree to record all locked full stripes of a RAID5/6 block group
  */
index 2205a4113ef3fbc5cab63e87002f976b8e2a395b..39c32c8fc24f80215ed70a8ebbea695196aebeed 100644 (file)
@@ -36,7 +36,19 @@ struct btrfs_free_space_op {
                           struct btrfs_free_space *info);
 };
 
-struct btrfs_io_ctl;
+struct btrfs_io_ctl {
+       void *cur, *orig;
+       struct page *page;
+       struct page **pages;
+       struct btrfs_fs_info *fs_info;
+       struct inode *inode;
+       unsigned long size;
+       int index;
+       int num_pages;
+       int entries;
+       int bitmaps;
+       unsigned check_crcs:1;
+};
 
 struct inode *lookup_free_space_inode(
                struct btrfs_block_group_cache *block_group,