Message ID | 20230203150634.3199647-22-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 73070C636D7 for <linux-mm@archiver.kernel.org>; Fri, 3 Feb 2023 15:08:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4A01F6B0078; Fri, 3 Feb 2023 10:08:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 36A776B0095; Fri, 3 Feb 2023 10:08:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D1F36B0096; Fri, 3 Feb 2023 10:08:49 -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 E84C86B007D for <linux-mm@kvack.org>; Fri, 3 Feb 2023 10:08:48 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id B938EA117F for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:08:48 +0000 (UTC) X-FDA: 80426312736.13.8665CD6 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf03.hostedemail.com (Postfix) with ESMTP id 9FCF220010 for <linux-mm@kvack.org>; Fri, 3 Feb 2023 15:08:46 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=t9FEQ5rj; dmarc=none; spf=none (imf03.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=1675436926; 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=WVeCTAFZrkMT1bjw8l1TFDAlVxNms+8mA7ykabtaeDg=; b=y+aYkznOJ74rJRByBrVwNiaeI7lCNLTem/UOFXO72EOhOAgzIaZOqvajiwzEQH5kGAANb7 M63FmZFK+DJqpDdMdAbup9jYoI0NhAuPvjOq1IoNWySIVcfNyfsoQpM0pa5t4H733tAzcV 96NW+lIVgF1SVKNx+4VfSA6btlOS90M= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=t9FEQ5rj; dmarc=none; spf=none (imf03.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=1675436926; a=rsa-sha256; cv=none; b=7ODlT0btij6w8cnEeV76jpYev7wT8sr8HKbsbmkATQrf21TR8BP1ZhE6CGzzJC78zheIry 1ESBhzlWOvVj0SGa0hemS5invzNzagmqv36jFBE1FZliA8jnECkrlpTomLh66eqE4GFtTI Z0kVZNw22scovsugYzfRWhzwvcVodEo= 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=WVeCTAFZrkMT1bjw8l1TFDAlVxNms+8mA7ykabtaeDg=; b=t9FEQ5rjC3OIn2nzgYy1gJw8Mr n53fGXsQMf+ehav4QQE5ZTAG8tGsjUiGEBVQYh2SDvUkP9IT5HI/OvK6+Vuq11BsHPccCsYlaVya8 pSFtm+XG2ShLMfy3vd1SSr6c38wjVS0dXGNtGikvtcXOlAn4vjpa1DRXkf999sCWxsy5/DVR36uk5 iqpwoO7N70bhXaz2L3OKdTWPG2CIMdaT/I9joJapJfQKQxfPZTsr5I5s2fspc63TJDqQDH58BYjKO tC7gYnap2gM8uy5sbPN/U8EX8p/ffgsOL0XlluLwFPxZAKLKhDgrpaYcRf0sLoH554FDB8S4FjEB0 l9W1hitg==; 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 1pNxfM-002bR0-0P; Fri, 03 Feb 2023 15:07:52 +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 21/23] sunrpc: use bvec_set_page to initialize bvecs Date: Fri, 3 Feb 2023 16:06:32 +0100 Message-Id: <20230203150634.3199647-22-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: 9FCF220010 X-Stat-Signature: xnxzc31ibs7czj5d7f69okojiggpq7ip X-HE-Tag: 1675436926-88790 X-HE-Meta: U2FsdGVkX19RpyRucyOgicZ1ADY+gcmirgiXVegsvxYGl7cg+otX8RDr6jMp3Hil0O4/EkFAaygTMaWWWP5DAau1BwI0QOFd6wD+zJQR+3sqBRyyu5N+FzNpyzKsqhLSJPDGo6gSl80zGbi4W/CVHIxFMNhlBc7rx755bScHS1cc+8lcVdI8TRFZ5Vx9mF8OWt95ZaIZ8XKky5BtmCtFWTP8QhHSIs8x3MTh053YLigxZGuvzdYD/4U5GC+2+jAVt6/OPMZlaQSD/9Tz2pLaDzQVi+F8Kbynqur+MCLThtQWMb6pmlNv9hUKA4SfdLrVXNgci7DmuaePqIXk2NiLggqTsHDEjK3/waS+paTLI4AEo/Kr1fb9JlM3uyuYp6j/HgEPkPYR6Wra9BGc/+TDaXIut2NvEoOfeecBmQ1hQGlfZVxnOS+sJUBb2WhCWOT4roBYvQu4JpTWg0ZWRVXdXJ4hQfDXiFiNUJwYsrJhWVeYR6/ya8jmf06GmrYqtRekZCUYf3tvODeTOqluul5ye+kBXJNPWfIFTcICBkAomeNZq/2i7eWCFS3qRtCDFbYNu9EZgrja4vD7RC4qHL8+PrRrOHjVAP4o5Ip9ZascZCQuBLY2sxu9L/ngl9RQRf6c2quo36E015Ygmm3RHVjETGuf42ci+GUUBYCZRrJSXpyx8sopO7xsTgLX7a1sfz0EB6NOapA2CI69skTgVEHfJjgvncizyUAbTWgCzAfWmYkC1bo+TvcGvm5nEkVu7lEauqyiSSenqr93sXH9aqxubw98+DkDF6650ZnRldBBjhvJfksoiW6kSDwj/699fITFLv1PYd0tjh1+M8irO6HVMb55dfdJLX6DXEiEUrIvOlk0Yp6SAAXHlwcppgBFuPxV1+iksYcGmex7gpI13w4db1wao0v3U1bMrNMiXhuOklJVTSvx9AsyRySMDlKW2HYuZhk2BxTeNwqnLrEWFNp qpiUwqGp 0+iTirQayQJiBNBI2zPfwinM2lVteE4epMlr7vc2bZtGRIy3iaEg1PdCnGXoSMpDh5va098IDtql6FD1GU5pDWNJlxwnx1gSewRw9uRG7ns8ojyYxlnVXLzndBvWKRUga6bZf0G6wKSDsoAXIRcSZUVmlCxG7HsWBKoBfOHTLL7XVxtukMYPuQGK7qn6fCVQjeTuSFaA35DICCiONIP5Bsc847YOQOuWb/XuMqUq81YRHbJoxM0ZqBbZO3CGVVqRqkagVxoUtWJVhKjN3SqsZbP/V50hdP5amdgpQSxTFX/p7FbozV4U4/43NsG3vgLHjyg3DbQkyl+irjRZy+4k7FviGHkthi5dsY5w+DNjdBRHcV9o91gO1mWG4Kq1gNx12kvJ6628yDLMGd0/2k5BmHQnK6VNiLmyQlJP5umVyjeFGkve68yqJx3InwnYA95Ra5vuKOBmvb0M7yNhnpbzz+pOvC0tivmWcWYqSWuDLMMoGazbn8RPsQfhrp9ITTSfvkUTJBXtEr9RI8Pk= 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/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 815baf308236a9..91252adcae4696 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -252,11 +252,8 @@ static ssize_t svc_tcp_read_msg(struct svc_rqst *rqstp, size_t buflen, clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); - for (i = 0, t = 0; t < buflen; i++, t += PAGE_SIZE) { - bvec[i].bv_page = rqstp->rq_pages[i]; - bvec[i].bv_len = PAGE_SIZE; - bvec[i].bv_offset = 0; - } + for (i = 0, t = 0; t < buflen; i++, t += PAGE_SIZE) + bvec_set_page(&bvec[i], rqstp->rq_pages[i], PAGE_SIZE, 0); rqstp->rq_respages = &rqstp->rq_pages[i]; rqstp->rq_next_page = rqstp->rq_respages + 1; diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index f7767bf224069f..afe7ec02d23229 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -150,9 +150,8 @@ xdr_alloc_bvec(struct xdr_buf *buf, gfp_t gfp) if (!buf->bvec) return -ENOMEM; for (i = 0; i < n; i++) { - buf->bvec[i].bv_page = buf->pages[i]; - buf->bvec[i].bv_len = PAGE_SIZE; - buf->bvec[i].bv_offset = 0; + bvec_set_page(&buf->bvec[i], buf->pages[i], PAGE_SIZE, + 0); } } return 0;