From mboxrd@z Thu Jan 1 00:00:00 1970 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 7C7E5C4332F for ; Tue, 20 Dec 2022 19:25:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233239AbiLTTZs (ORCPT ); Tue, 20 Dec 2022 14:25:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbiLTTZp (ORCPT ); Tue, 20 Dec 2022 14:25:45 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 884A1B19 for ; Tue, 20 Dec 2022 11:25:43 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 42A41768DC; Tue, 20 Dec 2022 19:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1671564342; h=from:from:reply-to: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=Gbp5Ss6+9wktso8ymIaca4JHriYKLZSlezsQd29zyOQ=; b=tMNFjWHsRuLOIwuQHd4eWtpVAQgnfLvFPbrUs5B5TcXCuvHdGW2QquJkPjg5EamdFrG/+0 rnZzkAsrzquFYamNuP9fo7rR9CIwfwQ+5QkD3P4+h+JiJqjgywF9FTJz7yChgf0O5NEvee oYSTJgeR74rGhOyAoiqI4D2bAL/YSSI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1671564342; h=from:from:reply-to: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=Gbp5Ss6+9wktso8ymIaca4JHriYKLZSlezsQd29zyOQ=; b=Jbl5DGo6Re+5vk9EMMy5eO85orxg8I3uULYfHyM3eK3gfNpTOuhdkOad8dPsBac99fWqg8 fRx82K0KXLO6WOAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 12ACB13254; Tue, 20 Dec 2022 19:25:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sMumAzYMomPdPAAAMHmgww (envelope-from ); Tue, 20 Dec 2022 19:25:42 +0000 Date: Tue, 20 Dec 2022 20:24:56 +0100 From: David Sterba To: Naohiro Aota Cc: Josef Bacik , "linux-btrfs@vger.kernel.org" , "kernel-team@fb.com" Subject: Re: [PATCH 6/8] btrfs: extract out zone cache usage into it's own helper Message-ID: <20221220192456.GR10499@twin.jikos.cz> Reply-To: dsterba@suse.cz References: <20221219070514.tgfqoiethziuwfdq@naota-xeon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221219070514.tgfqoiethziuwfdq@naota-xeon> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Mon, Dec 19, 2022 at 07:05:15AM +0000, Naohiro Aota wrote: > On Fri, Dec 16, 2022 at 03:15:56PM -0500, Josef Bacik wrote: > > There's a special case for loading the device zone info if we have the > > zone cache which is a fair bit of code. Extract this out into it's own > > helper to clean up the code a little bit, and as a side effect it fixes > > an uninitialized error we get with -Wmaybe-uninitialized where it > > thought zno may have been uninitialized. > > > > Signed-off-by: Josef Bacik > > I'm going to rewrite the code around here with the following WIP branch, to > improve the zone caching. > > https://github.com/naota/linux/commits/feature/zone-cache > > Specifically, this commit removes the for-loop and the "if (i == > *nr_zones)" block you moved in this patch. So, the resulting code will be > small enough to keep it there. > > https://github.com/naota/linux/commit/8d592ac744111bb2f51595a1608beecadb2c5d03 > > Could you wait for a while for me to clean-up and send the series? I'll > also check the series with -Wmaybe-uninitialized. I'd like to have the warnigs fixes first but if there is a shorter fix that would not move the code then it can go in now and you wouldn't have to redo your changes.