From patchwork Fri Sep 22 11:07:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 13395553 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 528D4CD4F5B for ; Fri, 22 Sep 2023 11:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233553AbjIVLOG (ORCPT ); Fri, 22 Sep 2023 07:14:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233551AbjIVLOE (ORCPT ); Fri, 22 Sep 2023 07:14:04 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53394AC for ; Fri, 22 Sep 2023 04:13:58 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 0A8C221879; Fri, 22 Sep 2023 11:13:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1695381237; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nrjIAhyiZPWvvzpDHy35UXS8dtVe+2Ej7K0N//nNpuI=; b=HImjCefhUGkz+VGx7qeqXTeLtZAQcH2FeEaoe8QFq4YONrsxhdTfkPpfQvmbH/kX4iefH3 NWAqF9CsDkVCvmDBiG3Intq3c6eeJoZrNVfqF020WwsEQui4RAQSmvhFXcKFcXNN3LMF1z dPaFh8KknWxIiqxHPaWHooNwLsQiFTM= Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id E53942C142; Fri, 22 Sep 2023 11:13:56 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 1BA46DA832; Fri, 22 Sep 2023 13:07:23 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH 5/8] btrfs: switch btrfs_backref_cache::is_reloc to bool Date: Fri, 22 Sep 2023 13:07:23 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The btrfs_backref_cache::is_reloc is an indicator variable and should use a bool type. Signed-off-by: David Sterba Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo --- 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);