linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 6/7] btrfs: move struct io_ctl to free-space-cache.h
Date: Fri, 23 Aug 2019 19:08:46 +0200	[thread overview]
Message-ID: <3cb910fc494f8ee7037e93174f7e40b012eef967.1566579823.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1566579823.git.dsterba@suse.com>

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(-)

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,
-- 
2.22.0


  parent reply	other threads:[~2019-08-23 17:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 17:08 [PATCH 0/7] Move some code out of ctree.c and ctree.h David Sterba
2019-08-23 17:08 ` [PATCH 1/7] btrfs: move cond_wake_up functions out of ctree David Sterba
2019-08-27 13:34   ` Johannes Thumshirn
2019-08-23 17:08 ` [PATCH 2/7] btrfs: move math functions to misc.h David Sterba
2019-08-27 13:35   ` Johannes Thumshirn
2019-08-23 17:08 ` [PATCH 3/7] btrfs: move private raid56 definitions from ctree.h David Sterba
2019-08-27 13:36   ` Johannes Thumshirn
2019-08-23 17:08 ` [PATCH 4/7] btrfs: rename and export read_node_slot David Sterba
2019-08-27 13:39   ` Johannes Thumshirn
2019-08-23 17:08 ` [PATCH 5/7] btrfs: move functions for tree compare to send.c David Sterba
2019-08-27 13:38   ` Johannes Thumshirn
2019-08-23 17:08 ` David Sterba [this message]
2019-08-27 13:40   ` [PATCH 6/7] btrfs: move struct io_ctl to free-space-cache.h Johannes Thumshirn
2019-08-23 17:08 ` [PATCH 7/7] btrfs: move dev_stats helpers to volumes.c David Sterba
2019-08-27 13:41   ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3cb910fc494f8ee7037e93174f7e40b012eef967.1566579823.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).