diff mbox series

[15/15] btrfs: add struct declarations in dev-replace.h

Message ID aea129f8e5420561d3f5fbeaa0de297b7122e815.1663196541.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs: strip out btrfs_fs_info dependencies | expand

Commit Message

Josef Bacik Sept. 14, 2022, 11:04 p.m. UTC
dev-replace.h just has function prototypes for device replace, however
if you happen to include it in the wrong order you'll get compile errors
because of different structures not being defined.  Since these are just
pointer args to functions we can declare them at the top in order to
reduce the pain of using the header.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/dev-replace.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Anand Jain Sept. 15, 2022, 1:06 p.m. UTC | #1
On 15/09/2022 07:04, Josef Bacik wrote:
> dev-replace.h just has function prototypes for device replace, however
> if you happen to include it in the wrong order you'll get compile errors
> because of different structures not being defined.  Since these are just
> pointer args to functions we can declare them at the top in order to
> reduce the pain of using the header.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>


Reviewed-by: Anand Jain <anand.jain@oracle.com>
Johannes Thumshirn Sept. 15, 2022, 2:54 p.m. UTC | #2
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
diff mbox series

Patch

diff --git a/fs/btrfs/dev-replace.h b/fs/btrfs/dev-replace.h
index 3911049a5f23..6084b313056a 100644
--- a/fs/btrfs/dev-replace.h
+++ b/fs/btrfs/dev-replace.h
@@ -7,6 +7,10 @@ 
 #define BTRFS_DEV_REPLACE_H
 
 struct btrfs_ioctl_dev_replace_args;
+struct btrfs_fs_info;
+struct btrfs_trans_handle;
+struct btrfs_dev_replace;
+struct btrfs_block_group;
 
 int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info);
 int btrfs_run_dev_replace(struct btrfs_trans_handle *trans);