Message ID | 20230203150634.3199647-9-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 283BBC6FA9D for <linux-mm@archiver.kernel.org>; Fri, 3 Feb 2023 15:08:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D592E6B0072; Fri, 3 Feb 2023 10:07:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C960C6B007D; Fri, 3 Feb 2023 10:07:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A97586B007E; Fri, 3 Feb 2023 10:07:53 -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 8F1146B0072 for <linux-mm@kvack.org>; Fri, 3 Feb 2023 10:07:53 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5DCFAA1162 for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:07:53 +0000 (UTC) X-FDA: 80426310426.10.4997EE0 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf20.hostedemail.com (Postfix) with ESMTP id 86C3E1C002A for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:07:51 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=hU1CqlCr; dmarc=none; spf=none (imf20.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=1675436871; 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=WNOyAXyw5xLCthfoZy3e9p002HqnVw4VbBE86ULx41A=; b=K9KAiyJnDcw8tDFjpPkHPBp2Ua6H6nfL8CUJaAFCKq6NOpUccu50xzfDdnwfZSczdM1mFw U4M7aUBI37m2ZmwR3p1xBlAyiQPd5eMWfUFd6kMOe478keY3X2qxR1BF7CJEAm6FR31aS6 1WIhZqed2u8tyDXl2Yc968dfj/OjcIU= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=hU1CqlCr; dmarc=none; spf=none (imf20.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=1675436871; a=rsa-sha256; cv=none; b=zzsGelfetbVGWAJ2ZIoKl3AFi4vguPSNbERbU1opJ53kNkbZ7LWU1fLPLn0U6ScMhinXkY nhszDXJpqjqDdUsDaflSRmJbT0fkIT3H6r7Sli03G93UlnVKsG0a4PpBELkRvewYRut67Y Ve3F7fzu4oM52/4MPvvPTu2f8j5bBW8= 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=WNOyAXyw5xLCthfoZy3e9p002HqnVw4VbBE86ULx41A=; b=hU1CqlCryou0nt23x7WKfgr9Yr Ze5pIoPK6R4xw6mzaF8Q13tT8AMdmc2pWHsPTaFT1tqAz0xMyzYUxgmuYr7ZpV+P+Fg+FuAqTYxaR o0KZ4xD9kRy/O3CUuF5ORgePKTIyprfQ/wp+cqJo9oLWqqRHk/tD6t2wSyKvk/7ne3sAsqWVXTNxc wjcc81M/GPoPtNKhO0d0cqBNfOSWqvGO/JfvXq+qWQ8QuWBiBrSBvCXZDh5P7DRYTIH5DD3oowHRu s28l5RjE8e6R6oXed9bn5RpUQB7Y+rkkaRQv759E+VNBc92z5H+MHU4P4MwaAFy/2mreTkAfweGEw Yz+nSGhQ==; 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 1pNxeY-002ank-IB; Fri, 03 Feb 2023 15:07:03 +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 08/23] rbd: use bvec_set_page to initialize the copy up bvec Date: Fri, 3 Feb 2023 16:06:19 +0100 Message-Id: <20230203150634.3199647-9-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: 86C3E1C002A X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: jcwf6ufhjm5dizgny6nxh8o3j9iynbta X-HE-Tag: 1675436871-240900 X-HE-Meta: U2FsdGVkX1/7lYrWiGBG9tLgDaZtRI+Qoq2NyB0eOrgev7O5pkq+r88PF2IkMlW1owKti4ezKZNp3hvNi20qJnkqgKA2N/6qpu8VYUi0oK36tK2kS8sb+KeL1faJgfwMT3s4+xm1qXEQGb43i1na2we4FqR6mlupMAdzovHe6ZN1l8C1UO1EPeAXTdhLBQAEOiiytv89qhbq/vayjdTks5SBtf1i+mCae6Wz6QP/FoBuYHZA+Y/3vrt5gx7o7MlaXHyM62K/5r62tzKS11yVmObfQwyMajfc/3kstlV1j9/dZvjcRh6D70IIQpWIYyYYOM07cBL7XE5s5I4BkDzPAyiULw7qi2s+x68BJWxiHZmjCq3HHNUAnhv3Wsot9n1QkotaXy4GNFp8AuoKKneer10pFMnEI2zjGmXqmzpbHqJQUVaBqLNnBxdyYoaIKauGZj6zo2YUryP8YVd9KhmwGC3dV3URr9SwYQuUsMnyseuJG+VNE4AZ6N9DGC721zW76qC6GUUdj6LLz9U9XtP0yL+88TCYGuhYX+h9dy2zshDzcswUNgq4qSiCpHTKVQFhlYB7A3KhXZL/VfiKvRgkeqwgQTtQbxlDKYtq8t0rU4YBnk/k4EGrKN9xwpxxk6kKfIIeSM7sEA0dnZx/9kGduY0eOKOEfSGAbq8ut5hmAszVEV24qxxgSigOx6DE4TqTDHaZfDgcZ4s+uTW83PjASpH0XypB0Hd2I1VKwfPOQkbH3zP056UsdXChnsxZpnzn7NC/kz0aq9PIzWBz0mmskQjpeTIFzOqGvT3VutQXLPF00KSt0sU8lNdxycFFPpwT1VOOJFk6SvyZsd6iOxtXNKQLb2bdDKICO5e75XQkqARg2PcK5Z/SzVzWxcASx/o3/WxAcQoXLdp2r/pmDKbHMwL67bdVSvLon3LqeMLFNrkfAAqx+wxbWbWCvNzLZ+0GKCu8u2NT0lD5mruc4YE FSxBiclU +N5jS5CuCN9ECVxXYRlrs9vjC2FXLLRZRUcFTb0GMxNG2WIqrwctK/jc2V1o4p4oPQ3gIDx0X4kgzhOsavNITnxcYc3Ijc/CMCj4N67xW0NSTpiWJbcMHaGVOWRW5GyncMsUyZ6yFrBdbQhY00YDz0AwN5bBhxVcgeV241CpxJCzlgRcUkqXowwpvrr0+mqFQy3q+uTYykBW217ax9tySjE4vjFp3HQrcpcBu9w6M+mdYJQpPmXsjsFw8bDDXWD9quFZYXXGNt9YyWwkuKoyFW5iArotCyZ+JE48+d24i9SmnQwmm57OAMDacFQTb7ysqKaDtS5aD7TJLbiEs2b/B+teMlCL4WIwCINJR8I2gxSenmRPcLxuX57PFcxtIm7foGt7n+gUVMfY/I9HuDq83uDEqnH/HPuOdH2T8boHNQWcagckpnrP8FnEdcslMZsLvLjPcrnmfRyNw1ipsJkmsYK4ZsiU+SDIVJD/yLOpVV9lHdtHD8IBY11IJgrlnGw3jKTS9 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
|
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 04453f4a319cb4..1faca7e07a4d52 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -3068,13 +3068,12 @@ static int setup_copyup_bvecs(struct rbd_obj_request *obj_req, u64 obj_overlap) for (i = 0; i < obj_req->copyup_bvec_count; i++) { unsigned int len = min(obj_overlap, (u64)PAGE_SIZE); + struct page *page = alloc_page(GFP_NOIO); - obj_req->copyup_bvecs[i].bv_page = alloc_page(GFP_NOIO); - if (!obj_req->copyup_bvecs[i].bv_page) + if (!page) return -ENOMEM; - obj_req->copyup_bvecs[i].bv_offset = 0; - obj_req->copyup_bvecs[i].bv_len = len; + bvec_set_page(&obj_req->copyup_bvecs[i], page, len, 0); obj_overlap -= len; }