Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH 00/11] btrfs: a variety of header file cleanups
Date: Tue, 15 Nov 2022 11:16:09 -0500	[thread overview]
Message-ID: <cover.1668526429.git.josef@toxicpanda.com> (raw)

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


             reply	other threads:[~2022-11-15 16:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15 16:16 Josef Bacik [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1668526429.git.josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox