Message ID | 20230203150634.3199647-10-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 85A82C6FA9E for <linux-mm@archiver.kernel.org>; Fri, 3 Feb 2023 15:08:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 394306B007D; Fri, 3 Feb 2023 10:07:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2CD906B007E; Fri, 3 Feb 2023 10:07:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0ACC66B0083; Fri, 3 Feb 2023 10:07:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E61DB6B007D for <linux-mm@kvack.org>; Fri, 3 Feb 2023 10:07:55 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id CF784811DF for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:07:55 +0000 (UTC) X-FDA: 80426310510.02.8866FC8 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf24.hostedemail.com (Postfix) with ESMTP id 14C6F180023 for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:07:53 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=SHYAKMQ+; spf=none (imf24.hostedemail.com: domain of BATV+416129e804eec9e75a33+7103+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+416129e804eec9e75a33+7103+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=1675436874; 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=81B+gzWiKP3dSyMHoEpejaF7sEqhUPFohDfKzzK3URY=; b=2usEc1opY1jKk/DQIj/BZejlmGGRwh5WutI33wXkLZ9WiCpy0pJApNQXEDlCTijHlZ0Vz6 t/2GSR+L1QEkCXaHLqgU2LQC4LXWlkthP/KnFDdR6ewO2YnLtoSa8nZtTSsqkuok02/P1P eliDc7xBv38y2lVaykot0Vb0TIB82ho= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=SHYAKMQ+; spf=none (imf24.hostedemail.com: domain of BATV+416129e804eec9e75a33+7103+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+416129e804eec9e75a33+7103+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675436874; a=rsa-sha256; cv=none; b=tzqhnfMDikN7QELFLHjkN9YLaf3Y03wybkphDqNtLWOQRXECOO64B4nMn4LGwb9uA0h9a/ eRAaRmRvxWdgcVBFD6ZevJYXPFtrQbd0JvJhN//aSHiar0Yagpz2Grphbduw7fYEhgfsNI AanK+H7kk2hfwgNtlIHX66PRjsywruw= 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=81B+gzWiKP3dSyMHoEpejaF7sEqhUPFohDfKzzK3URY=; b=SHYAKMQ+SwVUyLVeypwgrT8ITx 8OWSemfR3V1d5j1KVncg4YVuObwfg9Pbi32h+XryiQ6gJs4IZtST1Vv4iZ2hrbDVmjo3gmEVm7+ex RoPBp7jp/JuF4fa7BxH5vi1oAhRP7/Aw3jj0MJzqlpyt6AFJ90fRZah2qP7iO5Fa4hS+QXNBJM5G2 2fhU4cv9RjOoRb6A67sOeOJMRUWrq9yBLqOOwdzXIP7dYjqfyd7J8G4jWqM9LgJLyWvy41xt0Qfgo kGvvzQfyRIhnon9F7XkqbVma6W8zGAQfkAjRNuTkqVxLf+emMmW/6xjo5W4e00BEBjjlcCfn2iZAf UBeI/ApA==; Received: from [2001:4bb8:19a:272a:910:bb67:7287:f956] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNxeb-002apl-U8; Fri, 03 Feb 2023 15:07:06 +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 09/23] virtio_blk: use bvec_set_virt to initialize special_vec Date: Fri, 3 Feb 2023 16:06:20 +0100 Message-Id: <20230203150634.3199647-10-hch@lst.de> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230203150634.3199647-1-hch@lst.de> References: <20230203150634.3199647-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: 14C6F180023 X-Stat-Signature: ifanznkt38owqjpidugd1g75po8h1giz X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1675436873-511528 X-HE-Meta: U2FsdGVkX18wYB5P+tRgcQgzTVk9GNbusSUQjHJ/AUFFIY82irsBhLvTEgFzd8+nKL7gYuWGsTr8UklkY3+gpj4+zXrtMfL5ip5u2emqxZjUN26f7x0/JSXQVnUx+Gl7i+3BW4n2tXCE7vhIS2R3LgEqiXmHL6PHOq6cgrHYViQTKwqNn6QwaoB2LwjpALXqXolmKGvuzNArDWcp1HtMXgesKM/KMKvD76AYNTN6nHNsct6vlp7snA3ceZ46TtYDxloFdN513OgA+WST3CL3CaxK2DQzkaAK3FPTJoUw6nR9ci8tgPc48m+Lj3dMA8UjF+Vn9ujFi4IE4ct/zmcUMpIpHBjKIZxgSM1myxyOBSDlpKhuLKaeIRkvfPnqBIu8lX7tVauehwfSsSuqnV1N/p5ili6eb4aSwlcAj0PSdM/CFnzvRwr38fBOvJJcMPEVnQJLrkZhmVlbPxKp7Hfb0tEwIEBPRzq54kd79ztUkylXdJt3Tl7Is/mCiS/ligLu+ZZtOcL7W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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
|
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 6a77fa91742880..dc6e9b989910b0 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -170,9 +170,7 @@ static int virtblk_setup_discard_write_zeroes_erase(struct request *req, bool un WARN_ON_ONCE(n != segments); - req->special_vec.bv_page = virt_to_page(range); - req->special_vec.bv_offset = offset_in_page(range); - req->special_vec.bv_len = sizeof(*range) * segments; + bvec_set_virt(&req->special_vec, range, sizeof(*range) * segments); req->rq_flags |= RQF_SPECIAL_PAYLOAD; return 0;