Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1218961pxb; Tue, 1 Feb 2022 22:54:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwme8iot2yx8LiNL0ziFpWyicFXBr0uTep2ByNw/mkFDRNQIIvfFGRAr6H0saTm9icFr4hf X-Received: by 2002:a17:90b:3146:: with SMTP id ip6mr6645822pjb.208.1643784851590; Tue, 01 Feb 2022 22:54:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643784851; cv=none; d=google.com; s=arc-20160816; b=L1Yi0DRPp7fe8UYWK7wngn5c2UAB7g2zBy0PMR+eNf8RIYILgXwigSlW2xPwKcterI Uqgnf8tJ4oQQ1aS911/gZ61j7e0vQuZB843pFKB8xD0JPPIhU8IusleQ0M4nXwKc7IvN xJLVQZL9c00TXuEz2sYKAgpkMnzhgZIB5wKPNVOZ3vo6yXmXV080F6N5rZsfirA87iAK 1x5GH3/JNuHwGgWpUonVWKjFHeu8yXzc4GRXXBTXMWX0f4wNGurdFp2DLRJp+whXpHuH 1X3et00lPpNU/WL6O0GNTBiPOy9RVYArjMXzbGY6pEN6xwRZnI3HH4iHRPsqmxA042m0 mphQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=RnRfG+zgacPMg+NpWbcj01l5JvWAf98K2Qfxr1G1Ag0=; b=ckIg94ssaNGBnbT2El8dOYaS5CEMGi2dK3+cNi9akR0lt8unpQV5XcWERInjJ5p776 yR1maJtILk3df/Xodu89/Xv3cbTnF88rjundjbdHe9OCYgVFdQL1vySc3Z6xD9gXpVrp kMm1a+ZmUKQ7OSYjxZ5xH33cRrpNyco3XHfyuTPwtYaKTBJVbzxKYhJTPHPi0TBUxKai 16EZPsGSMUj760HJK8T1DaoZfEbru3xxMGIcI+8uC2s7vB379/KKXqgEVy1SG/vwgBax N/lR01wZRjLcrHq6aE7jUSc6B/JeMExUFZOqWYwadVD1dGpEjOB4w3RVuZPIPF1XAml+ aGmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=AzzcbJxT; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp4si5346039pjb.94.2022.02.01.22.53.59; Tue, 01 Feb 2022 22:54:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=AzzcbJxT; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237333AbiBALia (ORCPT + 99 others); Tue, 1 Feb 2022 06:38:30 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:56788 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233560AbiBALi3 (ORCPT ); Tue, 1 Feb 2022 06:38:29 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 62B42218B1; Tue, 1 Feb 2022 11:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1643715508; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RnRfG+zgacPMg+NpWbcj01l5JvWAf98K2Qfxr1G1Ag0=; b=AzzcbJxTzyXoJtU2VM7iMuYvYuGrmC4w8qw5/OBgrxU5FIG+jc400sosqmFEAZlCZDjd0X B3q+Gk1VBjV/q76RewWyeWCOTIxnqe4lIR4BFoyfHUGVYEs649oUr8V3//qDTzCkSW9ugD 2PQoMOJCdzVFuCmqvqN6Ai5z5+TIplM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1643715508; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RnRfG+zgacPMg+NpWbcj01l5JvWAf98K2Qfxr1G1Ag0=; b=wSUApJLysWgRUpLI/ndhyH+EXkixu10pEf4OuR7+uT278n3mLx7nCo8kejiBnLxNkdAHnG nj+VE0b+ms3j3wDA== Received: from quack3.suse.cz (unknown [10.163.28.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 51ECCA3B8B; Tue, 1 Feb 2022 11:38:28 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id 0BD03A05B1; Tue, 1 Feb 2022 12:38:28 +0100 (CET) Date: Tue, 1 Feb 2022 12:38:28 +0100 From: Jan Kara To: Ritesh Harjani Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, Theodore Ts'o , Jan Kara , Harshad Shirwadkar Subject: Re: [RFC 4/6] ext4: No need to test for block bitmap bits in ext4_mb_mark_bb() Message-ID: <20220201113828.coe2l74skdoyrlzz@quack3.lan> References: <65ffc304d66815b6e3270f71e5d756b307d3c5be.1643642105.git.riteshh@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65ffc304d66815b6e3270f71e5d756b307d3c5be.1643642105.git.riteshh@linux.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon 31-01-22 20:46:53, Ritesh Harjani wrote: > We don't need the return value of mb_test_and_clear_bits() in ext4_mb_mark_bb() > So simply use mb_clear_bits() instead. > > Signed-off-by: Ritesh Harjani Looks good. I'm rather confused by ext4_set_bits() vs mb_clear_bits() asymetry but that's not directly related to this patch. Just another cleanup to do. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/ext4/mballoc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c > index 60d32d3d8dc4..2f931575e6c2 100644 > --- a/fs/ext4/mballoc.c > +++ b/fs/ext4/mballoc.c > @@ -3943,7 +3943,7 @@ void ext4_mb_mark_bb(struct super_block *sb, ext4_fsblk_t block, > if (state) > ext4_set_bits(bitmap_bh->b_data, blkoff, clen); > else > - mb_test_and_clear_bits(bitmap_bh->b_data, blkoff, clen); > + mb_clear_bits(bitmap_bh->b_data, blkoff, clen); > if (ext4_has_group_desc_csum(sb) && > (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT))) { > gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT); > -- > 2.31.1 > -- Jan Kara SUSE Labs, CR