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 us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF08DC433F5 for ; Tue, 3 May 2022 20:18:47 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-192-hSbRPdisOmeXbmYr1eFh8w-1; Tue, 03 May 2022 16:17:15 -0400 X-MC-Unique: hSbRPdisOmeXbmYr1eFh8w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 175B63C025BC; Tue, 3 May 2022 20:17:12 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id BBE76111E3FD; Tue, 3 May 2022 20:17:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A4E1A1947049; Tue, 3 May 2022 20:17:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C55E81947043 for ; Tue, 3 May 2022 20:17:10 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8641D40314F; Tue, 3 May 2022 20:17:10 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82E2C463E16 for ; Tue, 3 May 2022 20:17:10 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2E0A918E538A for ; Tue, 3 May 2022 20:17:10 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-274-1W8J9znYOk-PusvINnGmsA-1; Tue, 03 May 2022 16:05:24 -0400 X-MC-Unique: 1W8J9znYOk-PusvINnGmsA-1 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 ams.source.kernel.org (Postfix) with ESMTPS id E6D72B82064; 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) Date: Tue, 3 May 2022 13:05:19 -0700 From: Jaegeuk Kim To: Pankaj Raghav Message-ID: References: <20220427160255.300418-1-p.raghav@samsung.com> <20220427160255.300418-16-p.raghav@samsung.com> MIME-Version: 1.0 In-Reply-To: <20220427160255.300418-16-p.raghav@samsung.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Subject: Re: [dm-devel] [PATCH 15/16] f2fs: ensure only power of 2 zone sizes are allowed X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jiangbo.365@bytedance.com, linux-nvme@lists.infradead.org, clm@fb.com, dm-devel@redhat.com, hch@lst.de, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, gost.dev@samsung.com, damien.lemoal@opensource.wdc.com, jonathan.derrick@linux.dev, kch@nvidia.com, chao@kernel.org, snitzer@kernel.org, josef@toxicpanda.com, linux-block@vger.kernel.org, dsterba@suse.com, kbusch@kernel.org, matias.bjorling@wdc.com, bvanassche@acm.org, axboe@kernel.dk, johannes.thumshirn@wdc.com, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, mcgrof@kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel