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 E6793C433F5 for ; Tue, 3 May 2022 20:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236512AbiECUJP (ORCPT ); Tue, 3 May 2022 16:09:15 -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> Precedence: bulk List-ID: X-Mailing-List: linux-block@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 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 4FA73C433F5 for ; Tue, 3 May 2022 20:05:41 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nlymC-00055v-CR; Tue, 03 May 2022 20:05:39 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nlymA-00055p-NH for linux-f2fs-devel@lists.sourceforge.net; Tue, 03 May 2022 20:05:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=SLM3Ygt2iESODXGmQs63u34UXciqPDbzgQ5fAhca4RU=; b=bCLYAXK2wHQfMt+yaCjYKDPhV3 pr443yB3Xqc5eCUWZ/ZWOnitkEIQDOESYoYh9NZ8804ZrTdIS9bSCX7FDQLlDAhX/6l8qANlqq7e9 sa+UX0uIFxFgaUx55odozIXRGj669Yn6MCASe2DiyCw6lczJbOTVog4KSz6/qGM4x7IA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=SLM3Ygt2iESODXGmQs63u34UXciqPDbzgQ5fAhca4RU=; b=TebrEhcVkgComokYfGdo+zH9pQ S6Jo0ta7cKguw3cdUMrrjJiR+3bYx8sARGoO9KaNlB3VR9e66PigGY3N+/kXqDPBL5NjL1gmuWuti Cr//E326VTXzWjoVOP17j1aIYXVRVRjzhxxDmzmoG6Bo+jom0Z2sc/UZUlBj9BkbN14s=; Received: from ams.source.kernel.org ([145.40.68.75]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1nlym5-000PTJ-7g for linux-f2fs-devel@lists.sourceforge.net; Tue, 03 May 2022 20:05:37 +0000 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) 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 Message-ID: References: <20220427160255.300418-1-p.raghav@samsung.com> <20220427160255.300418-16-p.raghav@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220427160255.300418-16-p.raghav@samsung.com> X-Headers-End: 1nlym5-000PTJ-7g Subject: Re: [f2fs-dev] [PATCH 15/16] f2fs: ensure only power of 2 zone sizes are allowed X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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, 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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