mbox series

[00/12] btrfs: inode creation cleanups and fixes

Message ID cover.1646348486.git.osandov@fb.com (mailing list archive)
Headers show
Series btrfs: inode creation cleanups and fixes | expand

Message

Omar Sandoval March 3, 2022, 11:18 p.m. UTC
From: Omar Sandoval <osandov@fb.com>

This series contains several cleanups and fixes for our inode creation
codepaths. The main motivation for this is preparation for fscrypt
support (in particular, setting up the fscrypt context at inode creation
time). But, it also reduces a lot of code duplication and fixes some
minor bugs, so it's worth getting in ahead of time.

Patch 12 is the main change, which unifies and simplifies all of our
inode creation codepaths. Patches 1-11 are small cleanups that I was
able to peel off of the big patch.

Thanks!

Omar Sandoval (12):
  btrfs: reserve correct number of items for unlink and rmdir
  btrfs: reserve correct number of items for rename
  btrfs: get rid of btrfs_add_nondir()
  btrfs: remove unnecessary btrfs_i_size_write(0) calls
  btrfs: remove unnecessary inode_set_bytes(0) call
  btrfs: remove unnecessary set_nlink() in btrfs_create_subvol_root()
  btrfs: remove unused mnt_userns parameter from __btrfs_set_acl
  btrfs: remove redundant name and name_len parameters to create_subvol
  btrfs: don't pass parent objectid to btrfs_new_inode() explicitly
  btrfs: move btrfs_get_free_objectid() call into btrfs_new_inode()
  btrfs: set inode flags earlier in btrfs_new_inode()
  btrfs: rework inode creation to fix several issues

 fs/btrfs/acl.c   |  39 +-
 fs/btrfs/ctree.h |  39 +-
 fs/btrfs/inode.c | 944 +++++++++++++++++++++++------------------------
 fs/btrfs/ioctl.c | 175 ++++-----
 fs/btrfs/props.c |  40 +-
 fs/btrfs/props.h |   4 -
 6 files changed, 581 insertions(+), 660 deletions(-)

Comments

Sweet Tea Dorminy March 7, 2022, 2:41 p.m. UTC | #1
For 1-11, please feel free to add

Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>

On 3/3/22 18:18, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
>
> This series contains several cleanups and fixes for our inode creation
> codepaths. The main motivation for this is preparation for fscrypt
> support (in particular, setting up the fscrypt context at inode creation
> time). But, it also reduces a lot of code duplication and fixes some
> minor bugs, so it's worth getting in ahead of time.
>
> Patch 12 is the main change, which unifies and simplifies all of our
> inode creation codepaths. Patches 1-11 are small cleanups that I was
> able to peel off of the big patch.
>
> Thanks!
>
> Omar Sandoval (12):
>    btrfs: reserve correct number of items for unlink and rmdir
>    btrfs: reserve correct number of items for rename
>    btrfs: get rid of btrfs_add_nondir()
>    btrfs: remove unnecessary btrfs_i_size_write(0) calls
>    btrfs: remove unnecessary inode_set_bytes(0) call
>    btrfs: remove unnecessary set_nlink() in btrfs_create_subvol_root()
>    btrfs: remove unused mnt_userns parameter from __btrfs_set_acl
>    btrfs: remove redundant name and name_len parameters to create_subvol
>    btrfs: don't pass parent objectid to btrfs_new_inode() explicitly
>    btrfs: move btrfs_get_free_objectid() call into btrfs_new_inode()
>    btrfs: set inode flags earlier in btrfs_new_inode()
>    btrfs: rework inode creation to fix several issues
>
>   fs/btrfs/acl.c   |  39 +-
>   fs/btrfs/ctree.h |  39 +-
>   fs/btrfs/inode.c | 944 +++++++++++++++++++++++------------------------
>   fs/btrfs/ioctl.c | 175 ++++-----
>   fs/btrfs/props.c |  40 +-
>   fs/btrfs/props.h |   4 -
>   6 files changed, 581 insertions(+), 660 deletions(-)
>