From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 5/8] btrfs: switch btrfs_backref_cache::is_reloc to bool
Date: Sat, 23 Sep 2023 08:01:53 +0930 [thread overview]
Message-ID: <46ed8ecd-cdbc-4467-85ef-b6ec1bc5f523@gmx.com> (raw)
In-Reply-To: <a6570ecf163983ecc3b057aab71dd3d76d8a5307.1695380646.git.dsterba@suse.com>
On 2023/9/22 20:37, David Sterba wrote:
> The btrfs_backref_cache::is_reloc is an indicator variable and should
> use a bool type.
>
> Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> fs/btrfs/backref.c | 2 +-
> fs/btrfs/backref.h | 4 ++--
> fs/btrfs/relocation.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
> index 0cde873bdee2..0dc91bf654b5 100644
> --- a/fs/btrfs/backref.c
> +++ b/fs/btrfs/backref.c
> @@ -3001,7 +3001,7 @@ int btrfs_backref_iter_next(struct btrfs_backref_iter *iter)
> }
>
> void btrfs_backref_init_cache(struct btrfs_fs_info *fs_info,
> - struct btrfs_backref_cache *cache, int is_reloc)
> + struct btrfs_backref_cache *cache, bool is_reloc)
> {
> int i;
>
> diff --git a/fs/btrfs/backref.h b/fs/btrfs/backref.h
> index 3b077d10bbc0..83a9a34e948e 100644
> --- a/fs/btrfs/backref.h
> +++ b/fs/btrfs/backref.h
> @@ -440,11 +440,11 @@ struct btrfs_backref_cache {
> * Reloction backref cache require more info for reloc root compared
> * to generic backref cache.
> */
> - unsigned int is_reloc;
> + bool is_reloc;
> };
>
> void btrfs_backref_init_cache(struct btrfs_fs_info *fs_info,
> - struct btrfs_backref_cache *cache, int is_reloc);
> + struct btrfs_backref_cache *cache, bool is_reloc);
> struct btrfs_backref_node *btrfs_backref_alloc_node(
> struct btrfs_backref_cache *cache, u64 bytenr, int level);
> struct btrfs_backref_edge *btrfs_backref_alloc_edge(
> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
> index 3e662cadecaf..75463377f418 100644
> --- a/fs/btrfs/relocation.c
> +++ b/fs/btrfs/relocation.c
> @@ -4016,7 +4016,7 @@ static struct reloc_control *alloc_reloc_control(struct btrfs_fs_info *fs_info)
>
> INIT_LIST_HEAD(&rc->reloc_roots);
> INIT_LIST_HEAD(&rc->dirty_subvol_roots);
> - btrfs_backref_init_cache(fs_info, &rc->backref_cache, 1);
> + btrfs_backref_init_cache(fs_info, &rc->backref_cache, true);
> rc->reloc_root_tree.rb_root = RB_ROOT;
> spin_lock_init(&rc->reloc_root_tree.lock);
> extent_io_tree_init(fs_info, &rc->processed_blocks, IO_TREE_RELOC_BLOCKS);
next prev parent reply other threads:[~2023-09-22 22:32 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 11:07 [PATCH 0/8] Minor cleanups in relocation.c David Sterba
2023-09-22 11:07 ` [PATCH 1/8] btrfs: relocation: use more natural types for tree_block bitfields David Sterba
2023-09-22 12:28 ` Johannes Thumshirn
2023-09-22 22:28 ` Qu Wenruo
2023-09-22 11:07 ` [PATCH 2/8] btrfs: relocation: use enum for stages David Sterba
2023-09-22 12:29 ` Johannes Thumshirn
2023-09-22 22:29 ` Qu Wenruo
2023-09-25 13:44 ` David Sterba
2023-09-22 11:07 ` [PATCH 3/8] btrfs: relocation: switch bitfields to bool in reloc_control David Sterba
2023-09-22 12:30 ` Johannes Thumshirn
2023-09-22 22:30 ` Qu Wenruo
2023-09-22 11:07 ` [PATCH 4/8] btrfs: relocation: open code mapping_tree_init David Sterba
2023-09-22 12:31 ` Johannes Thumshirn
2023-09-22 22:31 ` Qu Wenruo
2023-09-22 11:07 ` [PATCH 5/8] btrfs: switch btrfs_backref_cache::is_reloc to bool David Sterba
2023-09-22 12:31 ` Johannes Thumshirn
2023-09-22 22:31 ` Qu Wenruo [this message]
2023-09-22 11:07 ` [PATCH 6/8] btrfs: relocation: return bool from btrfs_should_ignore_reloc_root David Sterba
2023-09-22 12:36 ` Johannes Thumshirn
2023-09-22 18:35 ` David Sterba
2023-09-22 22:32 ` Qu Wenruo
2023-09-22 11:07 ` [PATCH 7/8] btrfs: relocation: use on-stack iterator in build_backref_tree David Sterba
2023-09-22 12:46 ` Johannes Thumshirn
2023-09-22 22:35 ` Qu Wenruo
2023-09-25 13:42 ` David Sterba
2023-10-04 12:35 ` Filipe Manana
2023-10-04 12:46 ` David Sterba
2023-09-22 11:07 ` [PATCH 8/8] btrfs: relocation: constify parameters where possible David Sterba
2023-09-22 12:43 ` Johannes Thumshirn
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=46ed8ecd-cdbc-4467-85ef-b6ec1bc5f523@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--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;
as well as URLs for NNTP newsgroup(s).