mbox series

[v2,00/12] btrfs: ctree.[ch] cleanups

Message ID cover.1692994620.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series btrfs: ctree.[ch] cleanups | expand

Message

Josef Bacik Aug. 25, 2023, 8:19 p.m. UTC
v1->v2:
- added "btrfs: include linux/security.h in super.c" to deal with a compile
  error after removing it from ctree.h in certain configs.

--- Original email ---
Hello,

While refreshing my ctree sync patches for btrfs-progs I ran into some oddness
around our crc32c related helpers that made the sync awkward.  This moves those
helpers around to other locations to make it easier to sync ctree.c into
btrfs-progs.

I also got a little distracted by the massive amount of includes we have in
ctree.h, so I moved code around to trim this down to the bare minimum we need
currently.

There's no functional change here, just moving things about and renaming things.
Thanks,

Josef


Josef Bacik (12):
  btrfs: move btrfs_crc32c_final into free-space-cache.c
  btrfs: remove btrfs_crc32c wrapper
  btrfs: move btrfs_extref_hash into inode-item.h
  btrfs: move btrfs_name_hash to dir-item.h
  btrfs: include asm/unaligned.h in accessors.h
  btrfs: include linux/crc32c in dir-item and inode-item
  btrfs: include linux/iomap.h in file.c
  btrfs: add fscrypt related dependencies to respective headers
  btrfs: add btrfs_delayed_ref_head declaration to extent-tree.h
  btrfs: include trace header in where necessary
  btrfs: include linux/security.h in super.c
  btrfs: remove extraneous includes from ctree.h

 fs/btrfs/accessors.h        |  1 +
 fs/btrfs/async-thread.c     |  1 +
 fs/btrfs/btrfs_inode.h      |  2 ++
 fs/btrfs/ctree.h            | 52 -------------------------------------
 fs/btrfs/dir-item.h         |  9 +++++++
 fs/btrfs/extent-tree.c      |  6 ++---
 fs/btrfs/extent-tree.h      |  1 +
 fs/btrfs/file.c             |  1 +
 fs/btrfs/free-space-cache.c |  9 +++++--
 fs/btrfs/inode-item.h       | 11 ++++++++
 fs/btrfs/locking.c          |  1 +
 fs/btrfs/props.c            |  1 +
 fs/btrfs/root-tree.h        |  2 ++
 fs/btrfs/send.c             |  6 ++---
 fs/btrfs/space-info.h       |  1 +
 fs/btrfs/super.c            |  1 +
 fs/btrfs/tree-checker.c     |  1 +
 17 files changed, 46 insertions(+), 60 deletions(-)

Comments

Johannes Thumshirn Aug. 28, 2023, 4:25 p.m. UTC | #1
On 25.08.23 22:21, Josef Bacik wrote:
> v1->v2:
> - added "btrfs: include linux/security.h in super.c" to deal with a compile
>    error after removing it from ctree.h in certain configs.
> 
> --- Original email ---
> Hello,
> 
> While refreshing my ctree sync patches for btrfs-progs I ran into some oddness
> around our crc32c related helpers that made the sync awkward.  This moves those
> helpers around to other locations to make it easier to sync ctree.c into
> btrfs-progs.
> 
> I also got a little distracted by the massive amount of includes we have in
> ctree.h, so I moved code around to trim this down to the bare minimum we need
> currently.
> 
> There's no functional change here, just moving things about and renaming things.
> Thanks,
> 
> Josef
> 

I'd fold 6/12 into the patches moving the hash functions, but otherwise
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
for the series
David Sterba Sept. 5, 2023, 1:45 p.m. UTC | #2
On Mon, Aug 28, 2023 at 04:25:47PM +0000, Johannes Thumshirn wrote:
> On 25.08.23 22:21, Josef Bacik wrote:
> > v1->v2:
> > - added "btrfs: include linux/security.h in super.c" to deal with a compile
> >    error after removing it from ctree.h in certain configs.
> > 
> > --- Original email ---
> > Hello,
> > 
> > While refreshing my ctree sync patches for btrfs-progs I ran into some oddness
> > around our crc32c related helpers that made the sync awkward.  This moves those
> > helpers around to other locations to make it easier to sync ctree.c into
> > btrfs-progs.
> > 
> > I also got a little distracted by the massive amount of includes we have in
> > ctree.h, so I moved code around to trim this down to the bare minimum we need
> > currently.
> > 
> > There's no functional change here, just moving things about and renaming things.
> > Thanks,
> > 
> > Josef
> > 
> 
> I'd fold 6/12 into the patches moving the hash functions, but otherwise

Agreed, updating includes as a collateral change is acceptable, though
in this series the point was to get the includes ready before the final
change to ctree.h. I'll fold the patch as you suggest, thanks.
David Sterba Sept. 5, 2023, 2:38 p.m. UTC | #3
On Fri, Aug 25, 2023 at 04:19:18PM -0400, Josef Bacik wrote:
> v1->v2:
> - added "btrfs: include linux/security.h in super.c" to deal with a compile
>   error after removing it from ctree.h in certain configs.
> 
> --- Original email ---
> Hello,
> 
> While refreshing my ctree sync patches for btrfs-progs I ran into some oddness
> around our crc32c related helpers that made the sync awkward.  This moves those
> helpers around to other locations to make it easier to sync ctree.c into
> btrfs-progs.
> 
> I also got a little distracted by the massive amount of includes we have in
> ctree.h, so I moved code around to trim this down to the bare minimum we need
> currently.
> 
> There's no functional change here, just moving things about and renaming things.
> Thanks,
> 
> Josef
> 
> 
> Josef Bacik (12):
>   btrfs: move btrfs_crc32c_final into free-space-cache.c
>   btrfs: remove btrfs_crc32c wrapper
>   btrfs: move btrfs_extref_hash into inode-item.h
>   btrfs: move btrfs_name_hash to dir-item.h
>   btrfs: include asm/unaligned.h in accessors.h
>   btrfs: include linux/crc32c in dir-item and inode-item
>   btrfs: include linux/iomap.h in file.c
>   btrfs: add fscrypt related dependencies to respective headers
>   btrfs: add btrfs_delayed_ref_head declaration to extent-tree.h
>   btrfs: include trace header in where necessary
>   btrfs: include linux/security.h in super.c
>   btrfs: remove extraneous includes from ctree.h

With patch 6 folded to 3 and 4 added to misc-next, thanks.