mbox series

[00/26] btrfs-progs: sync ctree.c into btrfs-progs

Message ID cover.1682799405.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series btrfs-progs: sync ctree.c into btrfs-progs | expand

Message

Josef Bacik April 29, 2023, 8:19 p.m. UTC
Hello,

This is a long series, and it depends on the following series

  btrfs-progs: prep work for syncing files into kernel-shared
  btrfs-progs: sync basic code from the kernel
  btrfs-progs: prep work for syncing ctree.c
  btrfs-progs: more prep work for syncing ctree.c
  
This is even more more prep work for syncing ctree.c, and the last patch is the
actual sync.  A lot of these prep patches are updating the callers to match the
current calling conventions in the kernel to make the syncing straightforward.

This entire series passes our tests.  Thanks,

Josef

Josef Bacik (26):
  btrfs-progs: stop using add_root_to_dirty_list in check
  btrfs-progs: remove useless add_root_to_dirty_list call in mkfs
  btrfs-progs: remove add_root_to_dirty_list call when creating free
    space tree
  btrfs-progs: make add_root_to_dirty_list static and unexport it
  btrfs-progs: pass btrfs_trans_handle through btrfs_clear_buffer_dirty
  btrfs-progs: update read_node_slot to match the kernel definition
  btrfs-progs: update btrfs_bin_search to match the kernel definition
  btrfs-progs: update btrfs_set_item_key_safe to match kernel definition
  btrfs-progs: update btrfs_print_leaf to match the kernel definition
  btrfs-progs: update btrfs_truncate_item to match the kernel definition
  btrfs-progs: update btrfs_extend_item to match the kernel definition
  btrfs-progs: sync memcpy_extent_buffer from the kernel
  btrfs-progs: change how we check supported csum type
  btrfs-progs: drop btrfs_init_path
  btrfs-progs: move btrfs_set_item_key_unsafe to check/
  btrfs-progs: move btrfs_record_file_extent and code into a new file
  btrfs-progs: make a local copy of btrfs_next_sibling_block in
    print-tree.c
  btrfs-progs: don't set the ->commit_root in btrfs_create_tree
  btrfs-progs: remove btrfs_create_root
  btrfs-progs: move btrfs_uuid_tree_add into mkfs/main.c
  btrfs-progs: make btrfs_del_ptr a void
  btrfs-progs: replace blocksize with parent argument for
    btrfs_alloc_tree_block
  btrfs-progs: use path->search_for_extension
  btrfs-progs: add write_extent_buffer_chunk_tree_uuid helper
  btrfs-progs: init new tree blocks in btrfs_alloc_tree_block
  btrfs-progs: sync ctree.c from the kernel

 Makefile                         |    1 +
 btrfs-corrupt-block.c            |    1 +
 btrfs-map-logical.c              |    1 +
 check/clear-cache.c              |   10 +-
 check/main.c                     |  114 +-
 check/mode-common.c              |   35 +-
 check/mode-lowmem.c              |   84 +-
 check/qgroup-verify.c            |   14 +-
 check/repair.c                   |   50 +-
 check/repair.h                   |    5 +
 cmds/inspect-dump-tree.c         |    5 +-
 cmds/inspect-tree-stats.c        |    3 +-
 cmds/rescue-chunk-recover.c      |   16 +-
 cmds/rescue.c                    |    2 +-
 cmds/restore.c                   |   26 +-
 common/extent-tree-utils.c       |  282 ++
 common/extent-tree-utils.h       |   28 +
 convert/main.c                   |   10 +-
 convert/source-fs.c              |    5 +-
 image/main.c                     |   13 +-
 include/kerncompat.h             |   80 +
 kernel-lib/trace.h               |    8 +
 kernel-shared/ctree.c            | 4848 ++++++++++++++++++++----------
 kernel-shared/ctree.h            |  138 +-
 kernel-shared/dir-item.c         |    4 +-
 kernel-shared/disk-io.c          |   36 +-
 kernel-shared/extent-tree.c      |  281 +-
 kernel-shared/extent_io.c        |   16 +-
 kernel-shared/extent_io.h        |    9 +-
 kernel-shared/file-item.c        |   15 +-
 kernel-shared/file.c             |    3 +-
 kernel-shared/free-space-cache.c |    4 +-
 kernel-shared/free-space-tree.c  |    1 -
 kernel-shared/inode-item.c       |    5 +-
 kernel-shared/inode.c            |    5 +-
 kernel-shared/locking.c          |    6 +-
 kernel-shared/print-tree.c       |   62 +-
 kernel-shared/print-tree.h       |    7 +-
 kernel-shared/transaction.c      |    9 +-
 kernel-shared/volumes.c          |    6 +-
 mkfs/main.c                      |   89 +-
 mkfs/rootdir.c                   |   11 +-
 quick-test.c                     |    6 +-
 tune/change-csum.c               |   23 +-
 tune/change-uuid.c               |    6 +-
 tune/convert-bgt.c               |   13 +-
 46 files changed, 4245 insertions(+), 2151 deletions(-)
 create mode 100644 common/extent-tree-utils.c
 create mode 100644 common/extent-tree-utils.h

Comments

David Sterba May 3, 2023, 2:20 p.m. UTC | #1
On Sat, Apr 29, 2023 at 04:19:31PM -0400, Josef Bacik wrote:
> Hello,
> 
> This is a long series, and it depends on the following series
> 
>   btrfs-progs: prep work for syncing files into kernel-shared
>   btrfs-progs: sync basic code from the kernel
>   btrfs-progs: prep work for syncing ctree.c
>   btrfs-progs: more prep work for syncing ctree.c
>   
> This is even more more prep work for syncing ctree.c, and the last patch is the
> actual sync.  A lot of these prep patches are updating the callers to match the
> current calling conventions in the kernel to make the syncing straightforward.

Added to devel, thanks. The includes were out of order or without the
prefix and some forward declarations or kerncompat.h includes were
needed to make it compile in the end.

The remaining issues are basically all around messages. There are now
two messages.[ch] and the pV handling is in the userspace side while
only used by kernel. Musl does not have the user defined specifiers so
we'll need to add a workaround with an intermediate string.

Other build tests seem to pass so I'll take it as a base line for
further fixups. Some changes can be done as separate patches to avoid
cascading changes in other commits but at least the printf.h should be
done in place.