public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 00/27] Struct btrfs_path auto cleaning conversions
Date: Thu, 27 Feb 2025 10:55:22 +0100	[thread overview]
Message-ID: <20250227095522.GA5777@twin.jikos.cz> (raw)
In-Reply-To: <cover.1740562070.git.dsterba@suse.com>

On Wed, Feb 26, 2025 at 10:50:40AM +0100, David Sterba wrote:
> We have the scoped freeing for struct btrfs_path but it's not used as
> much as it could. This patchset converts the easy cases and it's also a
> preview if we really want to do that. It makes understanding the exit
> paths a bit less obvious, but so far I think it's manageable.
> 
> The path is used in many functions and following a few simple patterns,
> with the macro BTRFS_PATH_AUTO_FREE quite visible among the
> declarations, so it's nothing hard to be aware of that when reading the
> code.
> 
> The conversion has been done on half of the files, so if somebody wants
> to continue, feel free. I've skipped functions with more complicated
> branching where the auto freeing would make it worse.
> 
> David Sterba (27):
>   btrfs: use BTRFS_PATH_AUTO_FREE in sample_block_group_extent_item()
>   btrfs: use BTRFS_PATH_AUTO_FREE in insert_dev_extent()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_setup_space_cache()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_start_dirty_block_groups()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_write_dirty_block_groups()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_insert_item()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_commit_inode_delayed_items()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_init_dev_replace()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_run_dev_replace()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_check_dir_item_collision()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_read_tree_root()
>   btrfs: use BTRFS_PATH_AUTO_FREE in load_global_roots()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_init_root_free_objectid()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_get_name()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_lookup_data_extent()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_lookup_extent_info()
>   btrfs: use BTRFS_PATH_AUTO_FREE in __btrfs_inc_extent_ref()
>   btrfs: use BTRFS_PATH_AUTO_FREE in run_delayed_extent_op()
>   btrfs: use BTRFS_PATH_AUTO_FREE in check_ref_exists()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_drop_subtree()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_insert_hole_extent()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_lookup_bio_sums()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_del_csums()
>   btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_remove_free_space_inode()
>   btrfs: use BTRFS_PATH_AUTO_FREE in populate_free_space_tree()
>   btrfs: use BTRFS_PATH_AUTO_FREE in clear_free_space_tree()
>   btrfs: use BTRFS_PATH_AUTO_FREE in load_free_space_tree()

Daniel noted that the trivial patches are maybe too trivial and should
be grouped into fewer patches. I agree after looking at the series now,
so I'll rework it

  parent reply	other threads:[~2025-02-27  9:55 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26  9:50 [PATCH 00/27] Struct btrfs_path auto cleaning conversions David Sterba
2025-02-26  9:50 ` [PATCH 01/27] btrfs: use BTRFS_PATH_AUTO_FREE in sample_block_group_extent_item() David Sterba
2025-02-26  9:50 ` [PATCH 02/27] btrfs: use BTRFS_PATH_AUTO_FREE in insert_dev_extent() David Sterba
2025-02-26  9:50 ` [PATCH 03/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_setup_space_cache() David Sterba
2025-02-26  9:50 ` [PATCH 04/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_start_dirty_block_groups() David Sterba
2025-02-26  9:50 ` [PATCH 05/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_write_dirty_block_groups() David Sterba
2025-02-26  9:50 ` [PATCH 06/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_insert_item() David Sterba
2025-02-26  9:51 ` [PATCH 07/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_commit_inode_delayed_items() David Sterba
2025-02-26  9:51 ` [PATCH 08/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_init_dev_replace() David Sterba
2025-02-26  9:51 ` [PATCH 09/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_run_dev_replace() David Sterba
2025-02-26  9:51 ` [PATCH 10/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_check_dir_item_collision() David Sterba
2025-02-26  9:51 ` [PATCH 11/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_read_tree_root() David Sterba
2025-02-26  9:51 ` [PATCH 12/27] btrfs: use BTRFS_PATH_AUTO_FREE in load_global_roots() David Sterba
2025-02-26  9:51 ` [PATCH 13/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_init_root_free_objectid() David Sterba
2025-02-26  9:51 ` [PATCH 14/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_get_name() David Sterba
2025-02-27  7:01   ` Johannes Thumshirn
2025-02-26  9:51 ` [PATCH 15/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_lookup_data_extent() David Sterba
2025-02-26  9:51 ` [PATCH 16/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_lookup_extent_info() David Sterba
2025-02-26  9:51 ` [PATCH 17/27] btrfs: use BTRFS_PATH_AUTO_FREE in __btrfs_inc_extent_ref() David Sterba
2025-02-26  9:51 ` [PATCH 18/27] btrfs: use BTRFS_PATH_AUTO_FREE in run_delayed_extent_op() David Sterba
2025-02-26  9:51 ` [PATCH 19/27] btrfs: use BTRFS_PATH_AUTO_FREE in check_ref_exists() David Sterba
2025-02-26  9:51 ` [PATCH 20/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_drop_subtree() David Sterba
2025-02-26  9:51 ` [PATCH 21/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_insert_hole_extent() David Sterba
2025-02-26  9:51 ` [PATCH 22/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_lookup_bio_sums() David Sterba
2025-02-26  9:51 ` [PATCH 23/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_del_csums() David Sterba
2025-02-26  9:51 ` [PATCH 24/27] btrfs: use BTRFS_PATH_AUTO_FREE in btrfs_remove_free_space_inode() David Sterba
2025-02-26  9:51 ` [PATCH 25/27] btrfs: use BTRFS_PATH_AUTO_FREE in populate_free_space_tree() David Sterba
2025-02-26  9:51 ` [PATCH 26/27] btrfs: use BTRFS_PATH_AUTO_FREE in clear_free_space_tree() David Sterba
2025-02-26  9:51 ` [PATCH 27/27] btrfs: use BTRFS_PATH_AUTO_FREE in load_free_space_tree() David Sterba
2025-02-27  7:06   ` Johannes Thumshirn
2025-02-27  7:09 ` [PATCH 00/27] Struct btrfs_path auto cleaning conversions Johannes Thumshirn
2025-02-27  9:55 ` David Sterba [this message]
2025-02-27 10:56   ` Johannes Thumshirn
2025-02-27 13:53     ` 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=20250227095522.GA5777@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.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