Message ID | 20230328112716.50120-3-p.raghav@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2146011vqo; Tue, 28 Mar 2023 04:38:56 -0700 (PDT) X-Google-Smtp-Source: AK7set+YjRUIxfIS9VnMnKG7915ONKMu3MV6wl9gBzS98vgOGyh4JL6pWqacn2CSi4rApU88o/dV X-Received: by 2002:a05:6a20:6692:b0:da:4e05:768 with SMTP id o18-20020a056a20669200b000da4e050768mr15016116pzh.38.1680003535839; Tue, 28 Mar 2023 04:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680003535; cv=none; d=google.com; s=arc-20160816; b=JuwgM6DVFG/5zIQPOWVaOHmdtbxke9kS2vxez/tLAzP37G2zmymbzWGK592AP7wNyR sQOdp8Jwg8Dw7uYZ3gqsrSeM8MFejjERsM/exIdxzhA0Y+pnA4MnUSHq8QRwy4lk5nOt FofamJkAVHapxzFN5gWGFfWhDmcPK7d1jzCtao72TDulX2SY79z4eTjwwFAonzl5dbAm X/RexAy/qZN+WNYKC5nCxB5D7r30IiJcCfeFdNECl4VViefDUDvN7etqYBmcJQjGcMYX N8FCSwI5REgRRNyet6UvqH7zqYm+I9VGGdYsuwHJwCEfAErh/1IX0TrfZyXYeYgcs3uc afMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=CdQ/QAA4HUstxavQOVZ/jTlQypv2+dxHUXTfyjJfsFQ=; b=ukVjPBy+IRKX4RnDHSVoCx0PyyEVswWtO9wSH+ktMmzmHC+XnPA4XaFpMg+8Q733YN wSpUpQSxdYKpgbN3VjC7i76BYg6uSerloTaTjdV7VEmk3ZAK8a16trM3BQ66bqk6ZBGt g6TxhZjAq+U7EPCv4xnzfx7xUjV6HhpVUpoXJvnfbS4OseX/eX9LtkE0lzIm1ffO4/a0 YFIpG4Blxeaya+bQpKrUuoD/2ccNCQgn1NoreVP+UZju1CU1xn41BqyQ1ZV4gj/TuMBP 1RsaxPImW3Q6mGg3FUaGfRB2+LmslJxjuKdoYJthpPjSimrQEgA16wz0hQSSUYEQmoSY LWqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VlzGtKbK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a63dc01000000b0050fb412dcc2si17511666pgg.380.2023.03.28.04.38.43; Tue, 28 Mar 2023 04:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VlzGtKbK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232170AbjC1L1l (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 28 Mar 2023 07:27:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232640AbjC1L1a (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 28 Mar 2023 07:27:30 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 663352D40 for <linux-kernel@vger.kernel.org>; Tue, 28 Mar 2023 04:27:28 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230328112721euoutp02217e0b587a2c2b6659a0ad8669b7ca6c~Qka7XmqqW3158631586euoutp02y for <linux-kernel@vger.kernel.org>; Tue, 28 Mar 2023 11:27:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230328112721euoutp02217e0b587a2c2b6659a0ad8669b7ca6c~Qka7XmqqW3158631586euoutp02y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1680002841; bh=CdQ/QAA4HUstxavQOVZ/jTlQypv2+dxHUXTfyjJfsFQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VlzGtKbKqfX+5cBNh5Hh7eQh+UnR46lbFD2VmnTOtRDIpE6gKEtgCRlBFqS2RIXKI s7aYIGYbJplH+ki6LLrAEkWShD65oAX4NuiIKVfnxUopgZLDdbiZX6TZjLBCc5HkaO 2kjH53fd4S6va4PhcQ6VD62owlvOgtpt4UgtmNBI= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230328112719eucas1p10474fc62f4ae26a7ac767e7ac1743a89~Qka50krkB2133321333eucas1p1P; Tue, 28 Mar 2023 11:27:19 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id A8.01.09966.71FC2246; Tue, 28 Mar 2023 12:27:19 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497~Qka5WYQr60534405344eucas1p2V; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230328112718eusmtrp13eff014ff761dc9f74c78ad532d3ee62~Qka5VkdI00876308763eusmtrp1T; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) X-AuditID: cbfec7f4-d39ff700000026ee-21-6422cf1759f9 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 1F.19.08862.61FC2246; Tue, 28 Mar 2023 12:27:18 +0100 (BST) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230328112718eusmtip26b96643ca4ec913cd0e3480ce3a23477~Qka5JB9ZZ0051900519eusmtip2L; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) From: Pankaj Raghav <p.raghav@samsung.com> To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org, akpm@linux-foundation.org, hubcap@omnibond.com, willy@infradead.org, viro@zeniv.linux.org.uk, senozhatsky@chromium.org, brauner@kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, mcgrof@kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org, Pankaj Raghav <p.raghav@samsung.com> Subject: [PATCH 2/5] orangefs: use folios in orangefs_readahead Date: Tue, 28 Mar 2023 13:27:13 +0200 Message-Id: <20230328112716.50120-3-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFKsWRmVeSWpSXmKPExsWy7djPc7ri55VSDJaeFbWYs34Nm8Xqu/1s Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4uT6/8wWNyY8ZbRY 9vU9u8XnpS3sFrs3LmK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YdSVP8dPE5kiD8yqaPyxyN1fYPO31OvwioELo r8vdO6fsEmbu/aeVYTpBiaU4I9FQi7moOBEAcj2KYl0DAAA= X-CMS-MailID: 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497 References: <20230328112716.50120-1-p.raghav@samsung.com> <CGME20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497@eucas1p2.samsung.com> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761611387399695469?= X-GMAIL-MSGID: =?utf-8?q?1761611387399695469?= |
Series | remove page_endio() | |
Commit Message
Pankaj Raghav
March 28, 2023, 11:27 a.m. UTC
Convert orangefs_readahead() from using struct page to struct folio.
This conversion removes the call to page_endio() which is soon to be
removed, and simplifies the final page handling.
The page error flags is not required to be set in the error case as
orangefs doesn't depend on them.
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
fs/orangefs/inode.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Comments
On Tue, Mar 28, 2023 at 01:27:13PM +0200, Pankaj Raghav wrote: > Convert orangefs_readahead() from using struct page to struct folio. > This conversion removes the call to page_endio() which is soon to be > removed, and simplifies the final page handling. > > The page error flags is not required to be set in the error case as > orangefs doesn't depend on them. > > Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Shouldn't Mike's tested-by be in here?
On 2023-03-28 17:21, Matthew Wilcox wrote: > On Tue, Mar 28, 2023 at 01:27:13PM +0200, Pankaj Raghav wrote: >> Convert orangefs_readahead() from using struct page to struct folio. >> This conversion removes the call to page_endio() which is soon to be >> removed, and simplifies the final page handling. >> >> The page error flags is not required to be set in the error case as >> orangefs doesn't depend on them. >> >> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> > > Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> > > Shouldn't Mike's tested-by be in here? I mentioned that he tested in my cover letter as I didn't receive a Tested-by tag from him.
I thought telling you that I tested it was good :-) ... Please do put a tested-by me in there... -Mike On Tue, Mar 28, 2023 at 12:02 PM Pankaj Raghav <p.raghav@samsung.com> wrote: > > On 2023-03-28 17:21, Matthew Wilcox wrote: > > On Tue, Mar 28, 2023 at 01:27:13PM +0200, Pankaj Raghav wrote: > >> Convert orangefs_readahead() from using struct page to struct folio. > >> This conversion removes the call to page_endio() which is soon to be > >> removed, and simplifies the final page handling. > >> > >> The page error flags is not required to be set in the error case as > >> orangefs doesn't depend on them. > >> > >> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> > > > > Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> > > > > Shouldn't Mike's tested-by be in here? > > I mentioned that he tested in my cover letter as I didn't receive a Tested-by > tag from him.
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index aefdf1d3be7c..9014bbcc8031 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -244,7 +244,7 @@ static void orangefs_readahead(struct readahead_control *rac) struct iov_iter iter; struct inode *inode = rac->mapping->host; struct xarray *i_pages; - struct page *page; + struct folio *folio; loff_t new_start = readahead_pos(rac); int ret; size_t new_len = 0; @@ -275,9 +275,10 @@ static void orangefs_readahead(struct readahead_control *rac) ret = 0; /* clean up. */ - while ((page = readahead_page(rac))) { - page_endio(page, false, ret); - put_page(page); + while ((folio = readahead_folio(rac))) { + if (!ret) + folio_mark_uptodate(folio); + folio_unlock(folio); } }