mbox series

[00/40] Parameter and type changes to btrfs_inode

Message ID cover.1667331828.git.dsterba@suse.com (mailing list archive)
Headers show
Series Parameter and type changes to btrfs_inode | expand

Message

David Sterba Nov. 1, 2022, 8:11 p.m. UTC
Many patches but also quite short, switching struct inode to struct
btrfs_node for structures and related functions in the io path, removing
some indirect function calls and typedefs.

David Sterba (40):
  btrfs: change how repair action is passed to btrfs_repair_one_sector
  btrfs: drop parameter compression_type from
    btrfs_submit_dio_repair_bio
  btrfs: change how submit bio callback is passed to btrfs_wq_submit_bio
  btrfs: simplify btree_submit_bio_start and btrfs_submit_bio_start
    parameters
  btrfs: switch async_submit_bio::inode to btrfs_inode
  btrfs: pass btrfs_inode to btrfs_submit_bio_start
  btrfs: pass btrfs_inode to btrfs_submit_bio_start_direct_io
  btrfs: pass btrfs_inode to btrfs_wq_submit_bio
  btrfs: pass btrfs_inode to btrfs_submit_metadata_bio
  btrfs: pass btrfs_inode to btrfs_submit_data_write_bio
  btrfs: pass btrfs_inode to btrfs_submit_data_read_bio
  btrfs: pass btrfs_inode to btrfs_submit_dio_repair_bio
  btrfs: pass btrfs_inode to submit_one_bio
  btrfs: pass btrfs_inode to btrfs_repair_one_sector
  btrfs: switch btrfs_dio_private::inode to btrfs_inode
  btrfs: pass btrfs_inode to btrfs_submit_dio_bio
  btrfs: pass btrfs_inode to btrfs_truncate
  btrfs: pass btrfs_inode to btrfs_inode_lock
  btrfs: pass btrfs_inode to btrfs_inode_unlock
  btrfs: pass btrfs_inode to btrfs_dirty_inode
  btrfs: pass btrfs_inode to btrfs_add_delalloc_inodes
  btrfs: switch btrfs_writepage_fixup::inode to btrfs_inode
  btrfs: pass btrfs_inode to btrfs_check_data_csum
  btrfs: pass btrfs_inode to __unlink_start_trans
  btrfs: pass btrfs_inode to btrfs_delete_subvolume
  btrfs: drop private_data parameter from extent_io_tree_init
  btrfs: switch extent_io_tree::private_data to btrfs_inode and rename
  btrfs: pass btrfs_inode to btrfs_merge_delalloc_extent
  btrfs: pass btrfs_inode to btrfs_set_delalloc_extent
  btrfs: pass btrfs_inode to btrfs_split_delalloc_extent
  btrfs: pass btrfs_inode to btrfs_clear_delalloc_extent
  btrfs: pass btrfs_inode to btrfs_unlink_subvol
  btrfs: pass btrfs_inode to btrfs_inode_by_name
  btrfs: pass btrfs_inode to fixup_tree_root_location
  btrfs: pass btrfs_inode to inode_tree_add
  btrfs: pass btrfs_inode to btrfs_inherit_iflags
  btrfs: switch async_chunk::inode to btrfs_inode
  btrfs: use btrfs_inode inside compress_file_range
  btrfs: use btrfs_inode inside btrfs_verify_data_csum
  btrfs: pass btrfs_inode to btrfs_add_delayed_iput

 fs/btrfs/btrfs_inode.h           |  29 +-
 fs/btrfs/compression.c           |   6 +-
 fs/btrfs/defrag.c                |  12 +-
 fs/btrfs/delayed-inode.c         |   4 +-
 fs/btrfs/disk-io.c               |  52 ++--
 fs/btrfs/disk-io.h               |  15 +-
 fs/btrfs/extent-io-tree.c        |  35 ++-
 fs/btrfs/extent-io-tree.h        |   6 +-
 fs/btrfs/extent_io.c             |  35 +--
 fs/btrfs/extent_io.h             |  11 +-
 fs/btrfs/file.c                  |  48 ++--
 fs/btrfs/free-space-cache.c      |   4 +-
 fs/btrfs/inode.c                 | 445 +++++++++++++++----------------
 fs/btrfs/ioctl.c                 |  10 +-
 fs/btrfs/ordered-data.c          |   2 +-
 fs/btrfs/reflink.c               |   4 +-
 fs/btrfs/relocation.c            |  11 +-
 fs/btrfs/tests/btrfs-tests.c     |   2 +-
 fs/btrfs/tests/extent-io-tests.c |   4 +-
 fs/btrfs/transaction.c           |   4 +-
 fs/btrfs/tree-log.c              |  24 +-
 fs/btrfs/volumes.c               |   3 +-
 include/trace/events/btrfs.h     |  27 +-
 23 files changed, 393 insertions(+), 400 deletions(-)

Comments

Anand Jain Nov. 3, 2022, 2:45 p.m. UTC | #1
On 02/11/2022 04:11, David Sterba wrote:
> Many patches but also quite short, switching struct inode to struct
> btrfs_node for structures and related functions in the io path, removing
> some indirect function calls and typedefs.
> 
> David Sterba (40):
>    btrfs: change how repair action is passed to btrfs_repair_one_sector
>    btrfs: drop parameter compression_type from
>      btrfs_submit_dio_repair_bio
>    btrfs: change how submit bio callback is passed to btrfs_wq_submit_bio

[patch 04/40]
>    btrfs: simplify btree_submit_bio_start and btrfs_submit_bio_start
>      parameters

>    btrfs: switch async_submit_bio::inode to btrfs_inode
>    btrfs: pass btrfs_inode to btrfs_submit_bio_start
>    btrfs: pass btrfs_inode to btrfs_submit_bio_start_direct_io
>    btrfs: pass btrfs_inode to btrfs_wq_submit_bio
>    btrfs: pass btrfs_inode to btrfs_submit_metadata_bio
>    btrfs: pass btrfs_inode to btrfs_submit_data_write_bio
>    btrfs: pass btrfs_inode to btrfs_submit_data_read_bio
>    btrfs: pass btrfs_inode to btrfs_submit_dio_repair_bio
>    btrfs: pass btrfs_inode to submit_one_bio
>    btrfs: pass btrfs_inode to btrfs_repair_one_sector
>    btrfs: switch btrfs_dio_private::inode to btrfs_inode
>    btrfs: pass btrfs_inode to btrfs_submit_dio_bio
>    btrfs: pass btrfs_inode to btrfs_truncate
>    btrfs: pass btrfs_inode to btrfs_inode_lock
>    btrfs: pass btrfs_inode to btrfs_inode_unlock
>    btrfs: pass btrfs_inode to btrfs_dirty_inode
>    btrfs: pass btrfs_inode to btrfs_add_delalloc_inodes
>    btrfs: switch btrfs_writepage_fixup::inode to btrfs_inode
>    btrfs: pass btrfs_inode to btrfs_check_data_csum
>    btrfs: pass btrfs_inode to __unlink_start_trans
>    btrfs: pass btrfs_inode to btrfs_delete_subvolume
>    btrfs: drop private_data parameter from extent_io_tree_init
>    btrfs: switch extent_io_tree::private_data to btrfs_inode and rename
>    btrfs: pass btrfs_inode to btrfs_merge_delalloc_extent
>    btrfs: pass btrfs_inode to btrfs_set_delalloc_extent
>    btrfs: pass btrfs_inode to btrfs_split_delalloc_extent
>    btrfs: pass btrfs_inode to btrfs_clear_delalloc_extent
>    btrfs: pass btrfs_inode to btrfs_unlink_subvol
>    btrfs: pass btrfs_inode to btrfs_inode_by_name
>    btrfs: pass btrfs_inode to fixup_tree_root_location
>    btrfs: pass btrfs_inode to inode_tree_add
>    btrfs: pass btrfs_inode to btrfs_inherit_iflags
>    btrfs: switch async_chunk::inode to btrfs_inode
>    btrfs: use btrfs_inode inside compress_file_range
>    btrfs: use btrfs_inode inside btrfs_verify_data_csum
>    btrfs: pass btrfs_inode to btrfs_add_delayed_iput


  With patch 04/40 fixed.

  Reviewed-by: Anand Jain <anand.jain@oracle.com>

  For the series.

  Just a note, the naming convention for the local variables... as inode
  represents struct btrfs_inode, we shouldn't use the same name for
  struct inode. Instead, vfs_inode is better. And binode is gone.

Thanks, Anand

>   fs/btrfs/btrfs_inode.h           |  29 +-
>   fs/btrfs/compression.c           |   6 +-
>   fs/btrfs/defrag.c                |  12 +-
>   fs/btrfs/delayed-inode.c         |   4 +-
>   fs/btrfs/disk-io.c               |  52 ++--
>   fs/btrfs/disk-io.h               |  15 +-
>   fs/btrfs/extent-io-tree.c        |  35 ++-
>   fs/btrfs/extent-io-tree.h        |   6 +-
>   fs/btrfs/extent_io.c             |  35 +--
>   fs/btrfs/extent_io.h             |  11 +-
>   fs/btrfs/file.c                  |  48 ++--
>   fs/btrfs/free-space-cache.c      |   4 +-
>   fs/btrfs/inode.c                 | 445 +++++++++++++++----------------
>   fs/btrfs/ioctl.c                 |  10 +-
>   fs/btrfs/ordered-data.c          |   2 +-
>   fs/btrfs/reflink.c               |   4 +-
>   fs/btrfs/relocation.c            |  11 +-
>   fs/btrfs/tests/btrfs-tests.c     |   2 +-
>   fs/btrfs/tests/extent-io-tests.c |   4 +-
>   fs/btrfs/transaction.c           |   4 +-
>   fs/btrfs/tree-log.c              |  24 +-
>   fs/btrfs/volumes.c               |   3 +-
>   include/trace/events/btrfs.h     |  27 +-
>   23 files changed, 393 insertions(+), 400 deletions(-)
>
David Sterba Nov. 11, 2022, 3:40 p.m. UTC | #2
On Thu, Nov 03, 2022 at 10:45:11PM +0800, Anand Jain wrote:
> On 02/11/2022 04:11, David Sterba wrote:
>   For the series.
> 
>   Just a note, the naming convention for the local variables... as inode
>   represents struct btrfs_inode, we shouldn't use the same name for
>   struct inode. Instead, vfs_inode is better. And binode is gone.

Yeah the naming could be done like that. Some functions interact only
with inode so I won't mind using that name but in case there are both it
would be better to use the vfs_ prefix.