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 4816AC433FE for ; Tue, 17 May 2022 11:55:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345590AbiEQLzw (ORCPT ); Tue, 17 May 2022 07:55:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345574AbiEQLzq (ORCPT ); Tue, 17 May 2022 07:55:46 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9A714C41B; Tue, 17 May 2022 04:55:41 -0700 (PDT) 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 1FA761F8F7; Tue, 17 May 2022 11:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1652788540; 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=XWV9I8vEC/gVBQMdfp4ZLR/XCARFFY3wFzVWUZZsLyM=; b=j9NlYg+lgeZw9lxeHS9hEMqYh9EWqsSTl22Ibl6SLszboSCxHZeZodscBEl49w/4vIrcOB uAXkoX1nvTKjUM1EUBcvOyjjqjRbNUJbZ/kq4stZ+0/lerrP5gO4626alqaz99tsnRPc1F LBtIqYYF955Cs3zK/ONXbGQa4CWL9/k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1652788540; 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=XWV9I8vEC/gVBQMdfp4ZLR/XCARFFY3wFzVWUZZsLyM=; b=dxEL63L4qVfrlSY8/gFaeGBil7Jzz5/q5q2u14C3uE+vuxIzDaaJnUvlZVhVxGzwFZtcYq HrloqJOf4p4mS8Cg== 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 B7A1D13305; Tue, 17 May 2022 11:55:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id nQDZKzuNg2JOAwAAMHmgww (envelope-from ); Tue, 17 May 2022 11:55:39 +0000 Date: Tue, 17 May 2022 13:51:21 +0200 From: David Sterba To: Johannes Thumshirn Cc: Pankaj Raghav , "axboe@kernel.dk" , "damien.lemoal@opensource.wdc.com" , "pankydev8@gmail.com" , "dsterba@suse.com" , "hch@lst.de" , "linux-nvme@lists.infradead.org" , "linux-fsdevel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "jiangbo.365@bytedance.com" , "linux-block@vger.kernel.org" , "gost.dev@samsung.com" , "linux-kernel@vger.kernel.org" , "dm-devel@redhat.com" , Luis Chamberlain Subject: Re: [PATCH v4 06/13] btrfs: zoned: Make sb_zone_number function non power of 2 compatible Message-ID: <20220517115121.GA18596@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Johannes Thumshirn , Pankaj Raghav , "axboe@kernel.dk" , "damien.lemoal@opensource.wdc.com" , "pankydev8@gmail.com" , "dsterba@suse.com" , "hch@lst.de" , "linux-nvme@lists.infradead.org" , "linux-fsdevel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "jiangbo.365@bytedance.com" , "linux-block@vger.kernel.org" , "gost.dev@samsung.com" , "linux-kernel@vger.kernel.org" , "dm-devel@redhat.com" , Luis Chamberlain References: <20220516165416.171196-1-p.raghav@samsung.com> <20220516165416.171196-7-p.raghav@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 17, 2022 at 06:53:40AM +0000, Johannes Thumshirn wrote: > On 16/05/2022 18:54, Pankaj Raghav wrote: > > /* Cache the sb zone number */ > > for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; ++i) { > > zone_info->sb_zone_location[i] = > > - sb_zone_number(zone_info->zone_size_shift, i); > > + sb_zone_number(bdev, i); > > I think this easily fits on one line now, doesn't it? But given David's > statement, it'll probably can go away anyways. I agree that the formatting can be adjusted, but I'm never sure if I should point it out during the phase of functional changes so it's fixed in the next iteration as well, or not to point it out to avoid fixups that would go away anyway. I think I've seen more, a styling pass will be done anyway once we're close to the final version..