Message ID | 20230130092157.1759539-8-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA04BC636CC for <linux-mm@archiver.kernel.org>; Mon, 30 Jan 2023 09:24:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0A5D86B007B; Mon, 30 Jan 2023 04:24:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EE6AC6B0085; Mon, 30 Jan 2023 04:24:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 82D986B007B; Mon, 30 Jan 2023 04:24:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 17ED56B0080 for <linux-mm@kvack.org>; Mon, 30 Jan 2023 04:24:02 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EC788120946 for <linux-mm@kvack.org>; Mon, 30 Jan 2023 09:24:01 +0000 (UTC) X-FDA: 80410928682.11.B02F84A Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf23.hostedemail.com (Postfix) with ESMTP id 3A7C514001D for <linux-mm@kvack.org>; Mon, 30 Jan 2023 09:23:59 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=yeg4s7gq; spf=temperror (imf23.hostedemail.com: error in processing during lookup of BATV+3ca177389f0c7d0d5156+7099+infradead.org+hch@bombadil.srs.infradead.org: DNS error) smtp.mailfrom=BATV+3ca177389f0c7d0d5156+7099+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675070640; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gx0nLEas5vXY4XJdO/lbtlr7xJlWecx82+q2uHX+Lho=; b=UWezFe2khf54kVha3sCbKVDZgs97MHxPCr7cpFbnXpGafQBgSFEqzwGzkeVIYOhbDjGnPh Mrw4nVSADUKlE5nkjwXUIiqhATUCgFZ8xp+W3j5Zg4964Ehf5HUn8BLayxtyjdKUPaHNaH 69BnULras4ynkE8Ilpr+3AWBlg+pPc0= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=yeg4s7gq; spf=temperror (imf23.hostedemail.com: error in processing during lookup of BATV+3ca177389f0c7d0d5156+7099+infradead.org+hch@bombadil.srs.infradead.org: DNS error) smtp.mailfrom=BATV+3ca177389f0c7d0d5156+7099+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675070640; a=rsa-sha256; cv=none; b=DL3S7g7vGEdscRZbcYtLztfEPuizK9FaBls/gfPuHhPyZwCnWwjeBYvsB8LKRG1xYoEY+n rAKfhzpSsGaffpbP75ffRuZxe+JIl4uEs0S9VxcJHofXWwT1yEzCk5iM2kYZRgA6YhYaEx 2j8iDKh1E5EjJfmc5y1AdeTTCcwyE+4= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=gx0nLEas5vXY4XJdO/lbtlr7xJlWecx82+q2uHX+Lho=; b=yeg4s7gq9DJKu/VauV7HjrbNXk WA82K3EG4T53jYpZBmBSIvVN1NWiwq36BmDTj9L8CxgtME+sTBIYOYxJ2rq7AWgsMfdFNfzp4fJdu uqAV4alMEhfFh4rrKBrBO7ECezdW/TjRPcQwW7m2GLvWOZNtFkyeG3jxOFK7MavPPVz4Nc0ByMC6O vBe6jOuX9q4TSyAOSFjiUCm7zuCZaS3K7DuZGoqA4GoPhRYKN1BKSZoT829lmBVHeRbZDtCV8N97p xCZ6HjiZmg9/nRwihqTRuuBqCtDwAr6o8caAQgpRuFyjHz2TTPhcynkZCDuzAMlYs395GEfvQZmgt UbDtcSsA==; Received: from [2001:4bb8:19a:272a:732e:e417:47d7:2f4a] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMQMt-002o6C-IU; Mon, 30 Jan 2023 09:22:28 +0000 From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@kernel.dk> Cc: Ilya Dryomov <idryomov@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Minchan Kim <minchan@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org>, Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>, Chaitanya Kulkarni <kch@nvidia.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, David Howells <dhowells@redhat.com>, Marc Dionne <marc.dionne@auristor.com>, Xiubo Li <xiubli@redhat.com>, Steve French <sfrench@samba.org>, Trond Myklebust <trond.myklebust@hammerspace.com>, Anna Schumaker <anna@kernel.org>, Mike Marshall <hubcap@omnibond.com>, Andrew Morton <akpm@linux-foundation.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Chuck Lever <chuck.lever@oracle.com>, linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, devel@lists.orangefs.org, io-uring@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 07/23] nvme: use bvec_set_virt to initialize special_vec Date: Mon, 30 Jan 2023 10:21:41 +0100 Message-Id: <20230130092157.1759539-8-hch@lst.de> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230130092157.1759539-1-hch@lst.de> References: <20230130092157.1759539-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Queue-Id: 3A7C514001D X-Stat-Signature: qrmw5iotsej3u3fpuar158jpid4du4z4 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1675070639-555998 X-HE-Meta: U2FsdGVkX1+e3bhWdRbNn/YTa9S+mS1ESq/g/EZYsv2Q/7gk9JyTv/ZczvLOfCeO89aYsSk63N7a19MjCobsGHTRyj/ZCV98AjgAyKqi/LcGu3pF5jhaFUdGKIvAXTo5k66VhiEfObom2BigOeVVLWzQIvEpMc30ABy9eS1TID6ZqdMLA6r3s7EBoJZzay4adQVCnkyITHiRw1dSXVCdswoH2E2r4Uvvb7zUjrEI5Ke89m0hkxm6GBYwcVPiBst0BhS1ozgB+BAu7kWxiOwHesFJu+6fzD/5otYI76GXfD1CCVpfQnqD3kru5QuHasuKxUN1VP60N2IuXcjC0RJi680TaaznzlkyoHST/t1dWUIID3E0BawcHkpBzy++WDqcPuty8bHnqNfY3LWqT18GLMxXQMCLBJTGXSLpkxMhPxonYVs6q/YNCMrCaym+ondu5tSpmjygdZ/v8SDcls+6ZDNYpwAaWg6WQO+Rtz3nPrSUlkz579ujC1ZqScayO9ljor0urkFccs2UJueSbKpeXVPEnJZstKm6ZCW1Gy8Bd6rv9QiiZKuAvC/A9VWcXNsHYR24CAwQ9Qw2fX+M3R8PhUJM86RFAtAv47VAlgpPDa/YxqPCc7hE2aOmCILE3AbAFYqsZdymnuRhNum6aHGdIuP6AEOYoRgMeIYfsgsjRb+ffwy7rbDyyL4jNPqOOSGQoQFL0vjKDM/uCQpyLTBSLsJ8yzgov1I5sbmMgiBcpj/XUINcua1fPWME9Y1kFXu41FYXcaGPwNc1xEdst39yzxx/CDBhOg06J9lAyuz3V65q+2U68C241HIiFasKa+JRuFrYWwv+5hgRVyRJ/0LdBweB9g61wfpru3E5ZjAYTIrkFKjMlv3/CVAj3PxedDet/LRZM1wpnl0eYQsErRczGuh3ol3HAf+xAGFCYh+v072la4E4/larl1Pltqp56tEV0MazOqw/445Dq0h/Tnv 8rqZFpRB HhGUJKw6516xHEoiO/IWUiXtGUFp/ZgXe33l7ROljSKTm8U5jY0mcpiYsMxbIQrb8A7d+hMSKHKjo2KfZxX4YeCFffAm5jP75g0W29DmYHVqRBdnPBQXWRNj6c08dZy7oS1CveK2AEQGguyobrENCVCRhSVeS4F6j11vG3TUXDnPccm/nT0VmYNokTAZt1FELtZCCXIfD36YBUTVzzDqx6DmCVjS9D5LMaqZReg7uImMjBAVNvm0ZECRgy2koH913b/Z16m2UY6gNMQFeRMgI7Gh6zjucnF2uZFfGKBE7mp9wLaKzPHVwDfhbbWbLcl+bcsQ0jBZOOaeJYT7SNCTJCEuzqPK0m/0GSqYmNGz61oXunDnMbC7XsIDd2qzD00CK6ND6z2OOK8RYBC0OJtUGTPD8uErZilPkip6l4Q9B0fRs/0XKBh1Yn3cVLEdDyeAi+KXJUyb4+nMShiMRYCTgTymKHZCvb2z9kFFrWHA+lr4Ldq8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
[01/23] block: factor out a bvec_set_page helper
|
expand
|
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
On 1/30/23 01:21, Christoph Hellwig wrote: > Use the bvec_set_virt helper to initialize the special_vec. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- Looks good. Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> -ck
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 505e16f20e57fa..7ba1accc3c22a4 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -806,9 +806,7 @@ static blk_status_t nvme_setup_discard(struct nvme_ns *ns, struct request *req, cmnd->dsm.nr = cpu_to_le32(segments - 1); cmnd->dsm.attributes = cpu_to_le32(NVME_DSMGMT_AD); - req->special_vec.bv_page = virt_to_page(range); - req->special_vec.bv_offset = offset_in_page(range); - req->special_vec.bv_len = alloc_size; + bvec_set_virt(&req->special_vec, range, alloc_size); req->rq_flags |= RQF_SPECIAL_PAYLOAD; return BLK_STS_OK;
Use the bvec_set_virt helper to initialize the special_vec. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/nvme/host/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)