Re: [PATCH 00/15] btrfs: strip out btrfs_fs_info dependencies

David Sterba
2022-09-20T11:50:20Z

On Wed, Sep 14, 2022 at 07:04:36PM -0400, Josef Bacik wrote:
> Part of the cleaning up of ctree.h is being able to move btrfs_fs_info out of
> it. This is actually pretty difficult because we essentially rely on ctree.h
> being included before everything else, so all other header files have fs_info
> defined for their helpers.
>
> This series starts this work. There are a variety of other small moves as well,
> but the bulk is trying to pull any helpers that access fs_info members inside of
> their header files into their respective c files, or alternatively reworking the
> code to drop the dependency. Thanks,
>
> Josef
>
> Josef Bacik (15):
> btrfs: move btrfs_caching_type to block-group.h
> btrfs: move btrfs_full_stripe_locks_tree into block-group.h
> btrfs: move btrfs_init_async_reclaim_work prototype to space-info.h
> btrfs: move btrfs_pinned_by_swapfile prototype into volumes.h
> btrfs: remove temporary btrfs_map_token declaration in ctree.h
> btrfs: move static_assert() for btrfs_super_block into fs.c
> btrfs: move btrfs_swapfile_pin into volumes.h
> btrfs: move fs_info struct declarations to the top of ctree.h
> btrfs: move btrfs_csum_ptr to inode.c
> btrfs: move the fs_info related helpers closer to fs_info in ctree.h
> btrfs: move btrfs_ordered_sum_size into file-item.c
> btrfs: delete btrfs_inode_sectorsize helper
> btrfs: delete btrfs_insert_inode_hash helper
> btrfs: use a runtime flag to indicate an inode is a free space inode
> btrfs: add struct declarations in dev-replace.h

All are safe changes, I've added it to misc-next, except the
static_assert patch (6/15) that would need to be slightly changed.