Skip to content

Commit

Permalink
btrfs: move struct io_ctl to free-space-cache.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Sep 9, 2019
1 parent 18d0f5c commit 67b61ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/block-group.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
14 changes: 0 additions & 14 deletions fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
14 changes: 13 additions & 1 deletion fs/btrfs/free-space-cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 67b61ae

Please sign in to comment.