Message ID | 20230203150634.3199647-4-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 A29E6C677F1 for <linux-mm@archiver.kernel.org>; Fri, 3 Feb 2023 15:07:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D92886B0074; Fri, 3 Feb 2023 10:07:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A22126B007B; Fri, 3 Feb 2023 10:07:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 341EA6B007B; Fri, 3 Feb 2023 10:07:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id AC97C6B0074 for <linux-mm@kvack.org>; Fri, 3 Feb 2023 10:07:48 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 4B31D1C5DB1 for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:07:48 +0000 (UTC) X-FDA: 80426310216.22.1D4D6C2 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf17.hostedemail.com (Postfix) with ESMTP id 3C1D14000A for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:07:45 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=s4yrPDzV; spf=none (imf17.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=1675436866; 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=i8uz5/Cr3yI4AKad2Qe+HNOvXzb51PMMHxDJaU9rAgw=; b=Rg5nq6n0KkW3GrRv4JArnCkGqrVMRIPvS/HxErbzZRgIBRpSm4CVNKWTBenchDQ9G51ZgR wFpzaFRE5rkzN0071TS8OasneqfXYUUjPvPchrL4hIuWBc9ApxGUHSnEEFfys8j7AKG2YV jgz94WGAwEC27ZG3KjITWAKzBj/0Mdg= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=s4yrPDzV; spf=none (imf17.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=1675436866; a=rsa-sha256; cv=none; b=TRXid4zIJtSlGXG/N6yXRXvDHpQDQOt3aoFdGDjw0ggHcdvloAWKdpj1rl1SC773+as1e6 h1YyuWccU2NQUt4+6pfz/HQ3P90bMpfnI8anszkN6ljFjXoD1M2CmZfMvG+CWVJCBTSIVB OpKIp89ip3ZM0UnCxM68Rs5tFMRxT6Q= 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=i8uz5/Cr3yI4AKad2Qe+HNOvXzb51PMMHxDJaU9rAgw=; b=s4yrPDzVMBpi6l0+EETwcbHIFv 2xwcbaenQAG3iI5OovZK8STydd1dXIrGWK8akwiQeQc2RIPwmHAQ3tB2YwFvPQAvHmMaIfIucx7Zp ajCj3SDxghdOlCv370eNnsuOoiH8YZgL2rB/Cifv8UVmXFYQH6UlD0uleebs0+/Lp4g3yoat0NQTP 3i4Ky2rvVCEbWtE/DFAD0kzDmDDcPhmnQe69wiJFwjPi1Kk71QZJfJKGcGt7gJuRlLjYYYrRMvnfN FFYd2dyKm+M7lYhIqCJrAgzbIeZRKknEymVkn8XFqgs4xeMmPgxEo3i4PzL6eEbspvJoriHHKn7qw v2H1dBXw==; 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 1pNxeH-002aen-LR; Fri, 03 Feb 2023 15:06:46 +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, Johannes Thumshirn <johannes.thumshirn@wdc.com> Subject: [PATCH 03/23] block: add a bvec_set_virt helper Date: Fri, 3 Feb 2023 16:06:14 +0100 Message-Id: <20230203150634.3199647-4-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-Server: rspam05 X-Rspamd-Queue-Id: 3C1D14000A X-Stat-Signature: 99z8cwawdaynw1yt9kgi693fowu6ssyd X-Rspam-User: X-HE-Tag: 1675436865-723652 X-HE-Meta: U2FsdGVkX1/BIgjl03ni5K0OqaJJrnLfjeuQSUKNaNbUHGWFb6KDeA55oIziMWhO4spTTZwmwaVbIEnD0F9M+APBXdLkza4OxetVGzgcIQx0JB54jvi+PM5GVl2jhjmEcLCd3fH8aX5PCQHZw5XSJ8Gv2ONVvzt6MhIgaoZ+N9siBHMXR69sYCGFMjY2htp75Ttgz3R1aLaUwbAY8msLzjBhMUQyIbWKOepeMPfjSaSAuneJr0BmJtLsBlJgl2CsBSX5os+JDMb7Fb/nK1mKpl0T0Y3VkFv12E3Qfo8yOnmSBY6zKmFsPaGXkrhqobJFK5m3UULygxHGGp/r+ZG8fgIeMod8CIBs4r4Fo6EfkCTD3C9CIO6WlZJILCa6iNW+aCngP0H3v39+qFcnfIKJ650YmykoRYHqGkPh7LQPuJDeXH7Mh9aYDEqUauZkHX9RNUI5joYBqUZ4wnTcrBFVb+jYRHHEaQTbe7q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: 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
|
diff --git a/include/linux/bvec.h b/include/linux/bvec.h index 2bae1134499e7f..f2d22931f3030a 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -63,6 +63,18 @@ static inline void bvec_set_folio(struct bio_vec *bv, struct folio *folio, bvec_set_page(bv, &folio->page, len, offset); } +/** + * bvec_set_virt - initialize a bvec based on a virtual address + * @bv: bvec to initialize + * @vaddr: virtual address to set the bvec to + * @len: length of the bvec + */ +static inline void bvec_set_virt(struct bio_vec *bv, void *vaddr, + unsigned int len) +{ + bvec_set_page(bv, virt_to_page(vaddr), len, offset_in_page(vaddr)); +} + struct bvec_iter { sector_t bi_sector; /* device address in 512 byte sectors */