Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1850407iob; Fri, 29 Apr 2022 14:30:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTfvzk4fD07jJSTrLMPT3/m6Thf7fraWP/NOkRkGm5Pe+JlQeMKH0ML6OQW3zzx6CCR9Oq X-Received: by 2002:a17:902:c40b:b0:15d:1361:f0f5 with SMTP id k11-20020a170902c40b00b0015d1361f0f5mr1239358plk.172.1651267823356; Fri, 29 Apr 2022 14:30:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651267823; cv=none; d=google.com; s=arc-20160816; b=W+ASZom36pxjr6VN9DYF2yVl8DUBXSzk7jqbem3+QyYTTgcpc9zc1hiNoz4LQItLhK 3/cNZD9Y1k3tIHGf0C1Dcgjat/prA4z/TiG30yIYoZUcrTNZfd5Y/ZVUZsMsPjompTUM yrHKt2U1Ir+8kS9GjRxtDjhhwqLf003urRXMHgNjuNKFkWys7DN/G4nrMd2M9MWQS6Rt //z0A3HEKopdacPLyTI2ZLvLZcdSYxZTBDlqvUoLXBUDnbRxFHlaF+UEIR+GTyAtDf7x xt33lz3wskyU1TO3eh2YWbq7XY+otC1RXrcxZ9Aiwub78NdL4FIgfawnfns8IpNQbid/ 1iPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:mime-version :content-transfer-encoding:content-id:content-language :accept-language:in-reply-to:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:dkim-filter; bh=Fi2WQlQ+0mZFujneK3WIoLAN6h7B2z2e6gI7T3/FrUI=; b=JGD1iJ0pg+VYB+Kew0+gFwvUkIkbAtB1lFyC40IQaQJyFmFAhs1S861N/hARCWrVnb KqiKR82MOl9QeS7AKgNW68F7vt88rKmv7ygWx2suuVX8s5eV68+BgLlRKTN+PNoUFb6+ gbyP3/2Wv8HyacDcx1QNhwY88uQeBtEPqSjaryzpWr67pBeNO3V9wI8yheMMtMAv686d /akoB7iEFKmzi9MuoP3KfJsBXQp37Jo+h9B0JK+NOUb4TtKihxuk2f56hnuM/R+z4R4Z FOVTR/HyEfHioXyjiijUPJel7NSTM23Qrmu69nk7h9MrrAuIYHUrKhnAFdesvoXU2GLk Za1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Smuiu79g; 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 f2-20020a056a0022c200b005061dab8a95si8383859pfj.121.2022.04.29.14.30.05; Fri, 29 Apr 2022 14:30:23 -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=Smuiu79g; 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 S1379705AbiD2RbL (ORCPT + 99 others); Fri, 29 Apr 2022 13:31:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379700AbiD2Rau (ORCPT ); Fri, 29 Apr 2022 13:30:50 -0400 Received: from mailout2.w2.samsung.com (mailout2.w2.samsung.com [211.189.100.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61FE4D64D1; Fri, 29 Apr 2022 10:27:14 -0700 (PDT) Received: from uscas1p2.samsung.com (unknown [182.198.245.207]) by mailout2.w2.samsung.com (KnoxPortal) with ESMTP id 20220429172713usoutp02645adda6df5e5dd344de6f9eb3a4506a~qbhE6Gv4Q0403704037usoutp021; Fri, 29 Apr 2022 17:27:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w2.samsung.com 20220429172713usoutp02645adda6df5e5dd344de6f9eb3a4506a~qbhE6Gv4Q0403704037usoutp021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1651253233; bh=Fi2WQlQ+0mZFujneK3WIoLAN6h7B2z2e6gI7T3/FrUI=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=Smuiu79gYUyRK7yyR2rr36OnCWYRZ+cjfbqMUJ8vfDicUh6yTiyU50am/U6r43+cj n87/Z7lZF0Qjr+gcHH76ynB5aiej9Qz/NoV5BGDbY3dBjmKOcMn9f8OdzFSHOc7S8e YJ6Z1x0+i2CozSHo18nuQwBWrlUPa/52ZHEfS5YI= Received: from ussmges3new.samsung.com (u112.gpu85.samsung.co.kr [203.254.195.112]) by uscas1p2.samsung.com (KnoxPortal) with ESMTP id 20220429172713uscas1p2d8cbaee723fac12a091c47f415ff47f3~qbhEhXC2I0887908879uscas1p2u; Fri, 29 Apr 2022 17:27:13 +0000 (GMT) Received: from uscas1p2.samsung.com ( [182.198.245.207]) by ussmges3new.samsung.com (USCPEMTA) with SMTP id A1.6D.09749.1FF1C626; Fri, 29 Apr 2022 13:27:13 -0400 (EDT) Received: from ussmgxs2new.samsung.com (u91.gpu85.samsung.co.kr [203.254.195.91]) by uscas1p2.samsung.com (KnoxPortal) with ESMTP id 20220429172712uscas1p2364e5c23f9df513deed5c6c522e9d6b1~qbhD_H7sP0887908879uscas1p2s; Fri, 29 Apr 2022 17:27:12 +0000 (GMT) X-AuditID: cbfec370-a83ff70000002615-8b-626c1ff14c8b Received: from SSI-EX3.ssi.samsung.com ( [105.128.2.146]) by ussmgxs2new.samsung.com (USCPEXMTA) with SMTP id D7.83.09672.0FF1C626; Fri, 29 Apr 2022 13:27:12 -0400 (EDT) Received: from SSI-EX3.ssi.samsung.com (105.128.2.228) by SSI-EX3.ssi.samsung.com (105.128.2.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.2375.7; Fri, 29 Apr 2022 10:27:11 -0700 Received: from SSI-EX3.ssi.samsung.com ([105.128.5.228]) by SSI-EX3.ssi.samsung.com ([105.128.5.228]) with mapi id 15.01.2375.007; Fri, 29 Apr 2022 10:27:11 -0700 From: Adam Manzanares To: Pankaj Raghav CC: "jaegeuk@kernel.org" , "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 06/16] nvmet: use blk_queue_zone_no() Thread-Topic: [PATCH 06/16] nvmet: use blk_queue_zone_no() Thread-Index: AQHYWlBImLMJLgQoTkmYJjdfDQL7UK0HnXCA Date: Fri, 29 Apr 2022 17:27:11 +0000 Message-ID: <20220429172711.GC174938@bgt-140510-bm01> In-Reply-To: <20220427160255.300418-7-p.raghav@samsung.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [105.128.2.176] Content-Type: text/plain; charset="us-ascii" Content-ID: <38ADAEB8F5BE6745ACC883C41F5D725E@ssi.samsung.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Brightmail-Tracker: H4sIAAAAAAAAA02SfUxbVRjGc+69vS1g3aUj4wDLmI0fk2mljGVHtoHo4q5TGcnikjmdFLmW z4Lt6th0CmGMUYaULWx6UVrQVBhsrHTRSVtEdHwMm5ry3Qw2AkwMUEDYCiJMyu0S/vu9532e 8zw5OQJc1EwGC1IUxxmlQpYuJn2JH1sf2F+cDU1PDO9lSVR/uxVHtYMlJLo0s4ijzjIbhi6U fMVHSzY7jqyuch76cyEXQzW1tzA0Ws/i6HzzDIGWNUOrZ2eGcfTfsBRdaOkFaKyHxZDVuR05 Rqr5yFG1H1msHQTqavyGRDrDGB9pzz7AUb92DKDSNhMPXZuYJlC7M+SVELqr+016pb2OpEvz XHzaPmQk6C6bmm64UkjSlTllOG36/gvarJ/DaPNADkkX57lI+uf8uzx6uqmHpOtv9BC01mTk 0XMNW+L93/Xdk8Skp3zCKF+KTvBNts0O8bLmfbK/0z/CcoBOoAE+AkhFQk2uGdcAX4GIqgHQ cHaU51mIqHwMdrjfeiyyDjYRnOgqgBP3dF7HLIA/VHzpHQwAjl97SHosJBUOl9qMuIcDqG3w frcJ8zBOafzgYFmkhzdSL8OixcZVvWBVEwWn9DSHEVD/+5qToJ6BFa2ONaeQ2gkrrk4SHvah dsOugeK1JEBtgu7bdd7bA6FzVIdxpf1hVbkF53gTXGkcJjl+Ct51/83n9C9AvfkfkuNo2Ovq xjneDg2VEziX6w87vh4lOG8Q/LW6f+0hIGX0hc4itzdsHxwaqfSGhcDlQQPGiQoAnNE28bhB C+CdqUVvjd1wpbCXrwVPs+uas+tasetasetaseta6QHvCghUq1QZcka1Q8GckKhkGSq1Qi75 MDOjAax+8s6V37JuAqdzVtICMAFoAVCAiwOE8+bkRJEwSXbyFKPM/ECpTmdULSBEQIgDhYaU 6zIRJZcdZ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ha2aIIwQlTs58wgLRKylxcMUNlgmMErOQrJuFZNQsJKNmIRk1 C8moBYysqxjFS4uLc9Mrio3yUsv1ihNzi0vz0vWS83M3MQKT4Ol/h6N3MN6+9VHvECMTB+Mh RgkOZiUR3i+7M5KEeFMSK6tSi/Lji0pzUosPMUpzsCiJ876MmhgvJJCeWJKanZpakFoEk2Xi 4JRqYLI1iLl7813Xrp8bvba3TPXdWX7PIehUzAJew58Lku136jnPr5/ey6NsrWKgezbSu2lF 8fv6O8HJn0TWV4mu1XXylPktK3Hx8OFt+7SnP1q12Srvs57x8pUlDi7vxGWWPb3EZa7qyr4v 9Oh8ubaDq320vewdpVQ8o5hYOb5NrT512flPaCXnDn1hJw0/cbfusltfv/BdfXB90ctfoUc8 JQrZ1LakHM8MD+RjqJt1nfv4h4o7kkFnnFIvV4rkVj5W2rIq+KG1EvNDNnO50vbNy8x27V25 4Z7AmXnzfKrml+YmT9Y5/Ez9F5fYjOW/eV6ub9Q7ukhgrZLXldZ9OV/+yj1ar/D3ui3fs0QV /qINt5RYijMSDbWYi4oTAXgIuhDxAwAA X-CMS-MailID: 20220429172712uscas1p2364e5c23f9df513deed5c6c522e9d6b1 CMS-TYPE: 301P X-CMS-RootMailID: 20220427160302eucas1p1aaba7a309778d3440c3315ad899e4035 References: <20220427160255.300418-1-p.raghav@samsung.com> <20220427160255.300418-7-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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS 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 On Wed, Apr 27, 2022 at 06:02:45PM +0200, Pankaj Raghav wrote: > From: Luis Chamberlain >=20 > Instead of open coding the number of zones given a sector, use the helper > blk_queue_zone_no(). This let's us make modifications to the math if > needed in one place and adds now support for npo2 zone devices. >=20 > Signed-off-by: Luis Chamberlain > Signed-off-by: Pankaj Raghav > --- > drivers/nvme/target/zns.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/nvme/target/zns.c b/drivers/nvme/target/zns.c > index e34718b09550..e41b6a6ef048 100644 > --- a/drivers/nvme/target/zns.c > +++ b/drivers/nvme/target/zns.c > @@ -243,7 +243,7 @@ static unsigned long nvmet_req_nr_zones_from_slba(str= uct nvmet_req *req) > unsigned int sect =3D nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba); > =20 > return blkdev_nr_zones(req->ns->bdev->bd_disk) - > - (sect >> ilog2(bdev_zone_sectors(req->ns->bdev))); > + bdev_zone_no(req->ns->bdev, sect); > } > =20 > static unsigned long get_nr_zones_from_buf(struct nvmet_req *req, u32 bu= fsize) > --=20 > 2.25.1 > Looks good. Reviewed by: Adam Manzanares =