Re: [PATCH v2 5/5] btrfs: reflow btrfs_free_tree_block

From: David Sterba
Date: Thu Nov 23 2023 - 14:00:38 EST


On Thu, Nov 23, 2023 at 04:33:02PM +0000, Filipe Manana wrote:
> On Thu, Nov 23, 2023 at 3:48 PM Johannes Thumshirn
> <johannes.thumshirn@xxxxxxx> wrote:
> >
> > Reflow btrfs_free_tree_block() so that there is one level of indentation
> > needed.
> >
> > This patch has no functional changes.
> >
> > Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> > Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
> > Signed-off-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
> > ---
> > fs/btrfs/extent-tree.c | 97 +++++++++++++++++++++++++-------------------------
> > 1 file changed, 49 insertions(+), 48 deletions(-)
> >
> > diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> > index 4044102271e9..093aaf7aeb3a 100644
> > --- a/fs/btrfs/extent-tree.c
> > +++ b/fs/btrfs/extent-tree.c
> > @@ -3426,6 +3426,7 @@ void btrfs_free_tree_block(struct btrfs_trans_handle *trans,
> > {
> > struct btrfs_fs_info *fs_info = trans->fs_info;
> > struct btrfs_ref generic_ref = { 0 };
> > + struct btrfs_block_group *cache;
>
> While at it, can we rename 'cache' to something like 'bg'?
>
> The cache name comes from the times where the structure was named
> btrfs_block_group_cache, and having it named cache is always
> confusing.

Agreed, using the new names in new code is highly recommended,
unfortunatelly we still have too many places using 'cache'.