diff mbox series

[6/7] btrfs: move struct io_ctl to free-space-cache.h

Message ID 3cb910fc494f8ee7037e93174f7e40b012eef967.1566579823.git.dsterba@suse.com (mailing list archive)
State New, archived
Headers show
Series Move some code out of ctree.c and ctree.h | expand

Commit Message

David Sterba Aug. 23, 2019, 5:08 p.m. UTC
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.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/block-group.h      |  2 ++
 fs/btrfs/ctree.h            | 14 --------------
 fs/btrfs/free-space-cache.h | 14 +++++++++++++-
 3 files changed, 15 insertions(+), 15 deletions(-)

Comments

Johannes Thumshirn Aug. 27, 2019, 1:40 p.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
diff mbox series

Patch

diff --git a/fs/btrfs/block-group.h b/fs/btrfs/block-group.h
index 5c6e2fb23e35..c391800388dd 100644
--- a/fs/btrfs/block-group.h
+++ b/fs/btrfs/block-group.h
@@ -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,
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 1fd5931a9489..5977995b1b69 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -433,20 +433,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
  */
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
index 2205a4113ef3..39c32c8fc24f 100644
--- a/fs/btrfs/free-space-cache.h
+++ b/fs/btrfs/free-space-cache.h
@@ -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,