Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp327006iob; Tue, 3 May 2022 18:53:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNQSifkMM2cz7tkkz+PuszQdXriGa+MZjL/8al7FwHrClRql4I1/bG1UNxnNOr9ibz2Npe X-Received: by 2002:a05:6a00:1496:b0:50d:9f76:ec7b with SMTP id v22-20020a056a00149600b0050d9f76ec7bmr18899173pfu.58.1651629216422; Tue, 03 May 2022 18:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651629216; cv=none; d=google.com; s=arc-20160816; b=YtejEsEWx4J2WpaJKou1x2BN3+IhQmnNzahrqAN5OAdtK3L8wKFF0rAopzNlgOzKHu cx7108akXiKBNGFLEYVVMTUJpWBKw0MMkxgt+vBkHP2c2Wljtz3OBvOOQj6jMC+nw/Ue 6e/wEpRIV9Z1HI/ve63+wCSfDB/lB7/QFqo+xzh9XFCLIVdCUjPtP6zamNJiQwKgTdg2 xdrivgp2ud5Wats5SzacG/0KlS1bcET3e1DdPUpdFPfWDDzECSORJO8NQUoGqwMEqdS5 1HfjjVHvBdpNhtLYSl2khZ0dwW1X6vrNwjFoAwgOxl+gLQImmNtudX+UVYfE8nTb21nQ 0ElA== 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; bh=SLM3Ygt2iESODXGmQs63u34UXciqPDbzgQ5fAhca4RU=; b=JK9rZc1VIMJ6+wMIyhkpdkB55dow7hDUfTBonIVUI7FgCrLWFAW1JH0pblsVSxF8O8 V7rg2IfpI9xhIrXB0cnTfRJJqVmvvwinr6xzw+QU+7bnj2FcWuVPk+tvmnKis2lK1Qub WsmNjZ9ofdk6wiJc1sWlpPNjvQqHLZ63xQtcXCHAYVCz1UtA5neWPIpmWfADcDp1+fYQ Bo0lwT5lJ6gX/+OYFRGPC0fytDd5spZXuYjDH3PTdI2qH7yyq54JNq3m4tEm18i06h65 b2BdemhTmLChC4c8gO67bV2mDZalf4TQKaU4C3UcgzpHYkCxbUYeNSjcwRZ5SMxCja8R 4tRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Z3gmS/aw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id md19-20020a17090b23d300b001d98cc9c20csi3181964pjb.189.2022.05.03.18.53.21; Tue, 03 May 2022 18:53:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b="Z3gmS/aw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237212AbiECUJV (ORCPT + 99 others); Tue, 3 May 2022 16:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236941AbiECUI5 (ORCPT ); Tue, 3 May 2022 16:08:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CA032AE0; Tue, 3 May 2022 13:05:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 40D856189A; Tue, 3 May 2022 20:05:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0282C385A4; Tue, 3 May 2022 20:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651608321; bh=2OQ31S8saJK84+b60Nks/1nuGKuObPzODZf658f3HMo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z3gmS/aw/5UbzdnldhQqOG3y2Htd54aWj3NdcFNjD/VuO6MUhIRAXm8gaqDMrbl7m 0Yd/IIwkIht0j2PXb+Na0iGFxmmXo69g/ybxOPgh9SC99E//dv42kQFiRnnJINmj0G WQVouHUD07VcTCvD102p1MYo7k7OtdRH4nZKSxophQWU5wzuRrxx/mIrjlCvn7kjsq yDReBNF0aClXwfI3zXeCWlW3e+RBMWhcbp6h1csAmjw9TRrSIgu4j5wxKNCdKT+oKm M5ALQh3FJxRyG6IiOBdtF5JBS3VvY3anbsCRiV8IDHss/pgBG5U5QwG09lcuiCVlnW Bdy2Z6nmvE8yA== Date: Tue, 3 May 2022 13:05:19 -0700 From: Jaegeuk Kim To: Pankaj Raghav Cc: axboe@kernel.dk, snitzer@kernel.org, hch@lst.de, mcgrof@kernel.org, naohiro.aota@wdc.com, sagi@grimberg.me, damien.lemoal@opensource.wdc.com, dsterba@suse.com, johannes.thumshirn@wdc.com, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, clm@fb.com, gost.dev@samsung.com, chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, josef@toxicpanda.com, jonathan.derrick@linux.dev, agk@redhat.com, kbusch@kernel.org, kch@nvidia.com, linux-nvme@lists.infradead.org, dm-devel@redhat.com, bvanassche@acm.org, jiangbo.365@bytedance.com, linux-fsdevel@vger.kernel.org, matias.bjorling@wdc.com, linux-block@vger.kernel.org Subject: Re: [PATCH 15/16] f2fs: ensure only power of 2 zone sizes are allowed Message-ID: References: <20220427160255.300418-1-p.raghav@samsung.com> <20220427160255.300418-16-p.raghav@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220427160255.300418-16-p.raghav@samsung.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied to f2fs tree. Thanks, On 04/27, Pankaj Raghav wrote: > From: Luis Chamberlain > > F2FS zoned support has power of 2 zone size assumption in many places > such as in __f2fs_issue_discard_zone, init_blkz_info. As the power of 2 > requirement has been removed from the block layer, explicitly add a > condition in f2fs to allow only power of 2 zone size devices. > > This condition will be relaxed once those calculation based on power of > 2 is made generic. > > Signed-off-by: Luis Chamberlain > Signed-off-by: Pankaj Raghav > --- > fs/f2fs/super.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > index f64761a15df7..db79abf30002 100644 > --- a/fs/f2fs/super.c > +++ b/fs/f2fs/super.c > @@ -3685,6 +3685,10 @@ static int init_blkz_info(struct f2fs_sb_info *sbi, int devi) > return 0; > > zone_sectors = bdev_zone_sectors(bdev); > + if (!is_power_of_2(zone_sectors)) { > + f2fs_err(sbi, "F2FS does not support non power of 2 zone sizes\n"); > + return -EINVAL; > + } > > if (sbi->blocks_per_blkz && sbi->blocks_per_blkz != > SECTOR_TO_BLOCK(zone_sectors)) > -- > 2.25.1