Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 00/11] btrfs: a variety of header file cleanups
@ 2022-11-15 16:16 Josef Bacik
  2022-11-15 16:16 ` [PATCH 01/11] btrfs: move root helpers back into ctree.h Josef Bacik
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Josef Bacik @ 2022-11-15 16:16 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

Hello,

While syncing accessors.[ch] I ran into a variety of oddities between what we do
in the kernel vs what we do in btrfs-progs.  Some of these things are just
differently named helpers, some are helpers we need in progs but don't have in
the kernel, and some of these are extent tree v2 stuff that was done in
btrfs-progs but not yet merged into the kernel. I kept the v2 stuff very simple,
it's mostly just updating helpers to take an extent_buffer.

Additionally I cleaned up how we do leaf manipulation, because those helpers are
a little wonky and you have to understand how the leaves are laid out.  I'm not
in love with what I came up with, but it makes the code a little cleaner, and
then it made the cleanups easier as there are only 4 sites that needed to be
updated instead of 32.

I made these changes in tandem with the btrfs-progs sync of accessors.[ch], and
then sync'ed the copy based on these changes.  I can obviously update them both
if there are changes required, but this is why the accessors.h looks different
in my btrfs-progs patchset, because it's actually a copy of that file with these
changes applied.  Thanks,

Josef

Josef Bacik (11):
  btrfs: move root helpers back into ctree.h
  btrfs: move leaf_data_end into ctree.c
  btrfs: move file_extent_item helpers into file-item.h
  btrfs: move eb offset helpers into extent_io.h
  btrfs: move the csum helpers into ctree.h
  btrfs: pass the extent buffer for the btrfs_item_nr helpers
  btrfs: add eb to btrfs_node_key_ptr_offset
  btrfs: add helpers for manipulating leaf items and data
  btrfs: remove BTRFS_LEAF_DATA_OFFSET
  btrfs: add nr_global_roots to the super block definition
  btrfs: add stack helpers for a few btrfs items

 fs/btrfs/accessors.c            |   2 +-
 fs/btrfs/accessors.h            | 124 ++++++++----------
 fs/btrfs/ctree.c                | 218 ++++++++++++++++++++------------
 fs/btrfs/ctree.h                |  63 ++++-----
 fs/btrfs/extent_io.c            |  10 +-
 fs/btrfs/extent_io.h            |  33 +++++
 fs/btrfs/file-item.h            |  34 +++++
 fs/btrfs/tree-checker.c         |   5 +-
 fs/btrfs/tree-mod-log.c         |   4 +-
 include/uapi/linux/btrfs_tree.h |   3 +-
 10 files changed, 295 insertions(+), 201 deletions(-)

-- 
2.26.3


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-11-18 16:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15 16:16 [PATCH 00/11] btrfs: a variety of header file cleanups Josef Bacik
2022-11-15 16:16 ` [PATCH 01/11] btrfs: move root helpers back into ctree.h Josef Bacik
2022-11-15 16:16 ` [PATCH 02/11] btrfs: move leaf_data_end into ctree.c Josef Bacik
2022-11-15 16:16 ` [PATCH 03/11] btrfs: move file_extent_item helpers into file-item.h Josef Bacik
2022-11-15 16:16 ` [PATCH 04/11] btrfs: move eb offset helpers into extent_io.h Josef Bacik
2022-11-15 16:16 ` [PATCH 05/11] btrfs: move the csum helpers into ctree.h Josef Bacik
2022-11-15 16:16 ` [PATCH 06/11] btrfs: pass the extent buffer for the btrfs_item_nr helpers Josef Bacik
2022-11-15 16:16 ` [PATCH 07/11] btrfs: add eb to btrfs_node_key_ptr_offset Josef Bacik
2022-11-15 16:16 ` [PATCH 08/11] btrfs: add helpers for manipulating leaf items and data Josef Bacik
2022-11-15 16:16 ` [PATCH 09/11] btrfs: remove BTRFS_LEAF_DATA_OFFSET Josef Bacik
2022-11-15 16:16 ` [PATCH 10/11] btrfs: add nr_global_roots to the super block definition Josef Bacik
2022-11-15 16:16 ` [PATCH 11/11] btrfs: add stack helpers for a few btrfs items Josef Bacik
2022-11-18 16:02 ` [PATCH 00/11] btrfs: a variety of header file cleanups David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox