Message ID | 20230203150634.3199647-3-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 97239C6FD1B for <linux-mm@archiver.kernel.org>; Fri, 3 Feb 2023 15:07:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 481146B0082; Fri, 3 Feb 2023 10:07:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 393116B0078; 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 CE2B06B007D; Fri, 3 Feb 2023 10:07:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AFDCB6B007B for <linux-mm@kvack.org>; Fri, 3 Feb 2023 10:07:48 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 6CE45A1152 for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:07:48 +0000 (UTC) X-FDA: 80426310216.24.35CAB3D Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf15.hostedemail.com (Postfix) with ESMTP id CF0AAA0027 for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:07:45 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=D+S3e79r; dmarc=none; spf=none (imf15.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 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=CiyB48vb6mrmTaEOVbqLR4u5Ie+kSkIibxGdt/yEGrQ=; b=sQKctHnl9dBbMmMC16HsZ2Ipea676gUyVC1kAeO278IXsNCnFl901XP4bqZ8R21ECWPmD1 jSJXwUMIajcoZ51W+wAIKb7NepWUxkD238ijcgV3Hk8alloCuhFGjZCMWXMhUDwQ3YvItF mlvyiwT8nHJ81SbjrU/cN1OynPfUjd8= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=D+S3e79r; dmarc=none; spf=none (imf15.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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675436866; a=rsa-sha256; cv=none; b=veVqn727Gp61LAu1mG3Z+0+mbjrTdMTsi4Gygw1QxuQkgM47k/apE5WCbMmqrT18vxE0k8 y1ow74Yf0zqUXsMDFVUS47EAqOSznRvCjUEE+BltqDOjbGQqQ+58c8rF7maiDFHz23ItGR grU2gvKkJ9YcDFXAx9NxeLcPUEoBS2I= 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=CiyB48vb6mrmTaEOVbqLR4u5Ie+kSkIibxGdt/yEGrQ=; b=D+S3e79rKed63zGKQODZ2ajajk tY9PTZKFAa2fY7TmJOLLnb65WB73dEl4Jgj/gOugeSqMbkmLbXohy1C6IwWfuiZo77jdisGjM3yt4 9xvdaWC7YH4+evg/huO/wnallnWJ+vAfbAy+KZ1lxMwOxypC9YvrMMgminhOcGcxNYLxnvCObX1OD yOODt3y4LRWDt6sPzQe9gbo91x07bQX4zJYyv+FuFp5RkEeW42m5CZNG2NJ+PmXd8QRNdkVwaLx8u Ed4Ftp13pBU7ExNTD2TCUOM24LHzJnSBzaVBjKWd5mYX39pRy/ZbN9BsCfck6fVftE+tsT0WOITG1 xZXpO+3Q==; 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 1pNxeE-002adJ-Pc; Fri, 03 Feb 2023 15:06:43 +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 02/23] block: add a bvec_set_folio helper Date: Fri, 3 Feb 2023 16:06:13 +0100 Message-Id: <20230203150634.3199647-3-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-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: CF0AAA0027 X-Stat-Signature: rduproc9pq47obyeeyjzrsk7n58r1xso X-HE-Tag: 1675436865-902501 X-HE-Meta: U2FsdGVkX19Y5Y82DQUvXAI8wo/RP8phAijSSwBZspeh62GxqpDGOJcZLSDfGlPjz65wXmrisidvqSJldbxRlSgjc5xqqIuxklqMajQzNTG2ZETaDz1ZVytcV0eXR/OTPuZuwrKlNZNUStOBFdkvw3+OgGQH0vn3KkGH7BlWTLNcfeotPxC0vPywXdLrGl6x1+6mAV8MDtt17ck6U7Yb1jl/qE2u6Gah7CmzUy0BMlXgE3+zqjkhx/4eqPsWlAVlJ8+RCuazcSCggP3DJ5pAQ0V7HR9TR+fciC8U3iPJwH5sEuaxRcI5uVv4dbTmxAUltA3QXcYYLGCjJX3TP8Py0sMrkhmZ8boLsRWxzLC4fjYkzzJFYBqnMnIXUFpWxXSh+OSp+SlEtR100G1fcBIjLFY6YEJyWDKyqI5yrelwAjVCU2fgjgLI1Vp+ewpkZtBhNTO7ZYNm9bWWC1qp8e12yZ0JRFk8cB84g1z+F0wk8yj9SIMbmVio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ofilter, 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 9e3dac51eb26b6..2bae1134499e7f 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -50,6 +50,19 @@ static inline void bvec_set_page(struct bio_vec *bv, struct page *page, bv->bv_offset = offset; } +/** + * bvec_set_folio - initialize a bvec based off a struct folio + * @bv: bvec to initialize + * @folio: folio the bvec should point to + * @len: length of the bvec + * @offset: offset into the folio + */ +static inline void bvec_set_folio(struct bio_vec *bv, struct folio *folio, + unsigned int len, unsigned int offset) +{ + bvec_set_page(bv, &folio->page, len, offset); +} + struct bvec_iter { sector_t bi_sector; /* device address in 512 byte sectors */