summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-08-21 13:57:04 -0400
committerDavid Sterba <dsterba@suse.com>2019-09-09 08:59:15 -0400
commit67b61aefcef3842a360e6c603860a785fd971c7a (patch)
tree8473d83a10d61a4bc2da39f42a4dd005ed3276a9
parent18d0f5c6e16ce762f92ab7879c30ff2e37cd9cef (diff)
btrfs: move struct io_ctl to free-space-cache.h
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>
-rw-r--r--fs/btrfs/block-group.h2
-rw-r--r--fs/btrfs/ctree.h14
-rw-r--r--fs/btrfs/free-space-cache.h14
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 @@
3#ifndef BTRFS_BLOCK_GROUP_H 3#ifndef BTRFS_BLOCK_GROUP_H
4#define BTRFS_BLOCK_GROUP_H 4#define BTRFS_BLOCK_GROUP_H
5 5
6#include "free-space-cache.h"
7
6enum btrfs_disk_cache_state { 8enum btrfs_disk_cache_state {
7 BTRFS_DC_WRITTEN, 9 BTRFS_DC_WRITTEN,
8 BTRFS_DC_ERROR, 10 BTRFS_DC_ERROR,
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 17cd88521ad2..0b6eca746fd4 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -434,20 +434,6 @@ enum btrfs_caching_type {
434 BTRFS_CACHE_ERROR, 434 BTRFS_CACHE_ERROR,
435}; 435};
436 436
437struct btrfs_io_ctl {
438 void *cur, *orig;
439 struct page *page;
440 struct page **pages;
441 struct btrfs_fs_info *fs_info;
442 struct inode *inode;
443 unsigned long size;
444 int index;
445 int num_pages;
446 int entries;
447 int bitmaps;
448 unsigned check_crcs:1;
449};
450
451/* 437/*
452 * Tree to record all locked full stripes of a RAID5/6 block group 438 * Tree to record all locked full stripes of a RAID5/6 block group
453 */ 439 */
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 {
36 struct btrfs_free_space *info); 36 struct btrfs_free_space *info);
37}; 37};
38 38
39struct btrfs_io_ctl; 39struct btrfs_io_ctl {
40 void *cur, *orig;
41 struct page *page;
42 struct page **pages;
43 struct btrfs_fs_info *fs_info;
44 struct inode *inode;
45 unsigned long size;
46 int index;
47 int num_pages;
48 int entries;
49 int bitmaps;
50 unsigned check_crcs:1;
51};
40 52
41struct inode *lookup_free_space_inode( 53struct inode *lookup_free_space_inode(
42 struct btrfs_block_group_cache *block_group, 54 struct btrfs_block_group_cache *block_group,