Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp170387imn; Thu, 4 Aug 2022 01:04:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Pa99+ln0erAnR3TwQYQI3MEEy4y/oLhxtxYP1uEAykfP4EHbe8QIlhdqxf+sVC0oTdzmO X-Received: by 2002:a17:907:2be5:b0:730:82bf:93c8 with SMTP id gv37-20020a1709072be500b0073082bf93c8mr532665ejc.686.1659600295831; Thu, 04 Aug 2022 01:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659600295; cv=none; d=google.com; s=arc-20160816; b=iQKhXnzkNOnzacqemzEtUzE2MgfcAv51dj+HnqyJf2wtkz6iIIC7+NZaW81k2WVKOG +cGgPd2ZAKhvQdq+5uyaSlBtgf5m75b0bWlsKYAu0tKQY4/eyDKdwrtmlfe3IOorQWwF DLHQR0E9OXnPnBZlCqH9nlxJKKICVmI+Wz7/3CcNlRaLO+9Fivzch7CU3Gs8h4NwwES1 BhnODoBFudzaCC1TUGKPYXW7XTVWJCcfbuVv/nL86USTuj1S/GpRwMAW8D8hu6xGHWoD 7Z9B2EBayXNShHuup2n4bEwAzzmtgK4lqUmTRmVyPL03AQSsZeQN31N+lcJty2j6fSjt nPBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=jnUbqqxtqKEs3eL1T2tnuuExSbUm+xevcGXFz+W0Zjs=; b=PaJuO7OE6WnENlCwgdDyAWSlMpb7xIk56STIrIfklHcJtxxaZbqL7Bkp0WVr6uNvFZ lg4RN5L6IvsuQxkgqMgDRgD/c6h+7yyOOkgkeDfRirMFwJ4K3OswD5wjlXZxKJNjXD++ fHXLp4H3X9BilszT5DXixFe/goehak3rCJE0t7pT3Y/RcIXceTmi9jyRcbaWMDqBE2+A vfhjIsv74RwxlYeJtNPRzLlQj3lCJ0R0tG1z33PVnRAVwC/fjoJWhKhKtGPHRptHiCKa whuTfIy5qufYzbHuc3hMZLfeCjKlaOBKsvd2tZ4Zzw6UWV3lIs0MQlWI598sKDyIdSH8 5DtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=b5bVjBr8; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a0564021e9000b0043c432626ffsi771890edf.5.2022.08.04.01.04.28; Thu, 04 Aug 2022 01:04:55 -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=@samsung.com header.s=mail20170921 header.b=b5bVjBr8; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238660AbiHDH37 (ORCPT + 99 others); Thu, 4 Aug 2022 03:29:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232987AbiHDH35 (ORCPT ); Thu, 4 Aug 2022 03:29:57 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18838220F7 for ; Thu, 4 Aug 2022 00:29:53 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220804072948euoutp025d0ddbf2e71d6d56d5efece254d2dc46~IE8J5UGV62160821608euoutp02c for ; Thu, 4 Aug 2022 07:29:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220804072948euoutp025d0ddbf2e71d6d56d5efece254d2dc46~IE8J5UGV62160821608euoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1659598188; bh=jnUbqqxtqKEs3eL1T2tnuuExSbUm+xevcGXFz+W0Zjs=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=b5bVjBr8G5YaEgeMlRi5OLilr0xgnA+lQ2jxpgYHrxAx/3zdRwhaGsjyEv71yCfsQ C+h5PxZDvI8OMZCQgcMyfaigIMcUAkw9vEAFceTQog27ZMVbXJiW0WXM34tMrISsap XTUq9/wzWzI91w0TNMwcbfuf3D2RbrEpT7lGVo/4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20220804072948eucas1p121431348dc2c1518f5e4162314d7e198~IE8JgzTTM2410624106eucas1p1N; Thu, 4 Aug 2022 07:29:48 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 90.6F.10067.C657BE26; Thu, 4 Aug 2022 08:29:48 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220804072947eucas1p13d72273f427549e045227443a1b5986e~IE8JH1r-i3015830158eucas1p1-; Thu, 4 Aug 2022 07:29:47 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220804072947eusmtrp2d9ed2aef8f7f26f182d2f638ed0d03fa~IE8JG9fZC2908429084eusmtrp2a; Thu, 4 Aug 2022 07:29:47 +0000 (GMT) X-AuditID: cbfec7f4-dd7ff70000002753-7a-62eb756c783f Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 5E.9C.09038.B657BE26; Thu, 4 Aug 2022 08:29:47 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220804072947eusmtip10cdd8d8afa4cf74d25a908afe0f498aa~IE8I7rQ8t1783017830eusmtip1S; Thu, 4 Aug 2022 07:29:47 +0000 (GMT) Received: from [192.168.8.130] (106.210.248.112) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 4 Aug 2022 08:29:45 +0100 Message-ID: <73f35f39-9637-056e-91b9-ee6b2c104977@samsung.com> Date: Thu, 4 Aug 2022 09:29:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [dm-devel] [PATCH v9 05/13] nvme: zns: Allow ZNS drives that have non-power_of_2 zone size Content-Language: en-US To: Bart Van Assche , , , , , , CC: , , , , , , , , Luis Chamberlain From: Pankaj Raghav In-Reply-To: <2616b59b-8c6b-a482-a396-d9408fa461a3@acm.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [106.210.248.112] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDKsWRmVeSWpSXmKPExsWy7djPc7o5pa+TDM4/4bRYf+oYs8Xqu/1s FtM+/GS2+H32PLPF3nezWS1Wrj7KZPFk/Sxmi79d95gs9t7Stri8aw6bxfxlT9ktJrR9Zba4 MeEpo8Wam09ZLE7cknbg97h8xdtj56y77B6Xz5Z6bFr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Z/s2+Ycu19Wr33Rh7r/tsGeTbVvrtaHKQYqsRRnJBpq MRcVJwIA5SgUHaYDAAA= X-CMS-MailID: 20220804072947eucas1p13d72273f427549e045227443a1b5986e X-Msg-Generator: CA X-RootMTR: 20220803094808eucas1p1a6a800161d32fe4242d39e669e5f3527 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220803094808eucas1p1a6a800161d32fe4242d39e669e5f3527 References: <20220803094801.177490-1-p.raghav@samsung.com> <20220803094801.177490-6-p.raghav@samsung.com> <2616b59b-8c6b-a482-a396-d9408fa461a3@acm.org> 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,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS autolearn=unavailable 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 Hi Bart, On 2022-08-03 19:22, Bart Van Assche wrote: > On 8/3/22 02:47, Pankaj Raghav wrote: >> -    sector &= ~(ns->zsze - 1); >> +    /* >> +     * Round down the sector value to the nearest zone start >> +     */ >> +    div64_u64_rem(sector, ns->zsze, &remainder); >> +    sector -= remainder; > > Could bdev_offset_from_zone_start() be used here? > We call this function during blk_revalidate_disk_zones() to evaluate the chunk sectors. So we can't call bdev_offset_from_zone_start() from here as the chunk_sectors will not be initialized yet :)