From patchwork Tue Apr 11 12:29:18 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 81935
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2534852vqo;
Tue, 11 Apr 2023 05:33:39 -0700 (PDT)
X-Google-Smtp-Source:
AKy350YKyecJ9ZyQxxVuSNzCcFT9DgbK+IL63qTSv7fXpgXnZ6cS9KxamNgEenAadjT2+ISDHvZT
X-Received: by 2002:a17:906:630f:b0:94a:8a80:3f4e with SMTP id
sk15-20020a170906630f00b0094a8a803f4emr6078999ejc.22.1681216419181;
Tue, 11 Apr 2023 05:33:39 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1681216419; cv=none;
d=google.com; s=arc-20160816;
b=UTbBjJUpjU15uAK1/26o2jwMb4KAOiRhCYRfN6JgNMMg8Tium9VSARZeDgr+9n4lYQ
aruwHm+PM1wwbPF2sT1LIYSolnencGarqpBHzGSiWWaUt6rkzis3oQjDpeQ+cEOKnonq
da7SDWgkll0FnraH00gEYcn51U7FnY4V0jHFFhRE41Ifkx2rMmg3MB9n6q1QmKX2FgDU
jR0gZXaboa9CD0VSpUP7hO5MRtLxLHsdIFyHD6nRDtb+W+TNENRax31KiXZwhPe7QwfH
hLbFoFuLNmSC1DLNHuiA2ftyboH3Z+HyUTPpLedT00JzXaYWsXwopz9s3vRUZPMLbzxT
5oyA==
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=PIVtaWRdXFvvGvca/utIz/lLXjHseGY076GdVp9CofQ=;
b=HhNzCaxnRbwx8fCNhm/JoRHHYsLqQfR84V72bjKl/f8W1OiEERVZYx+aLQ1va/7Qge
93zwfg5mglv1niWyk2MHDATjH8jTSJBQ1ww4qgJAGw/KcPC2cEOcQ1aItxzWZbergszR
9g4LoCUaa2GacOOb0+6FGjZdfcWyNh0khaF8C5DlDAWuHSZm2V7bJkDhG77hCLFxmbSN
maBS5nzh3JIkaCeb1rRqzzqfkD4pp0dv1fI8l6JaEWv1/SO10cs551iNGqLsiQYFCahl
dgas5bmnzD1zOjDax9fwWP8A1/1D/gZvmMYc+Het67o31zwCSi/qyxAweZP4kauJvVF2
9mYQ==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@samsung.com header.s=mail20170921
header.b=s+NcSqyq;
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
lf1-20020a170906ae4100b008b17e6556c3si9934467ejb.587.2023.04.11.05.33.08;
Tue, 11 Apr 2023 05:33:39 -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=s+NcSqyq;
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 S229997AbjDKM3f (ORCPT
+ 99 others); Tue, 11 Apr 2023 08:29:35 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47990 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S229664AbjDKM3b (ORCPT
);
Tue, 11 Apr 2023 08:29:31 -0400
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 001EA212E
for ;
Tue, 11 Apr 2023 05:29:26 -0700 (PDT)
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230411122925euoutp01bad171b2ed3f4aa9d3ab71e4d4daac44~U4THzgCaj0478604786euoutp01X
for ;
Tue, 11 Apr 2023 12:29:25 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230411122925euoutp01bad171b2ed3f4aa9d3ab71e4d4daac44~U4THzgCaj0478604786euoutp01X
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1681216165;
bh=PIVtaWRdXFvvGvca/utIz/lLXjHseGY076GdVp9CofQ=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=s+NcSqyqbq11RtsrC+miaqtF9/zatU92pOylTRwd7fqlJapAX0PouHP1PgEAx/uXx
DyeEETwwsyKbo+sFwMBF1sju9QKbpPx1/GJyuzdssfrueHqz7EcEhAZP0KLactXS2B
wP3ZGLEpiAXdItnsQ4DEPTcKYoI50y18gs5kxSuc=
Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20230411122923eucas1p2f756a287f9f45b8c76bdbd7f81d949db~U4TF8Df2y3228532285eucas1p2t;
Tue, 11 Apr 2023 12:29:23 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges3new.samsung.com (EUCPMTA) with SMTP id B8.9A.10014.3A255346;
Tue, 11
Apr 2023 13:29:23 +0100 (BST)
Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20230411122923eucas1p27e097fa66db8e166d14658bc7c6f180b~U4TFlFxcc3003730037eucas1p27;
Tue, 11 Apr 2023 12:29:23 +0000 (GMT)
Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by
eusmtrp1.samsung.com (KnoxPortal) with ESMTP id
20230411122923eusmtrp1f4a4812316778b3dcb34ac05a45a01dd~U4TFkUivq0646206462eusmtrp1S;
Tue, 11 Apr 2023 12:29:23 +0000 (GMT)
X-AuditID: cbfec7f5-b8bff7000000271e-03-643552a3acbc
Received: from eusmtip2.samsung.com ( [203.254.199.222]) by
eusmgms2.samsung.com (EUCPMTA) with SMTP id B7.FB.34412.2A255346;
Tue, 11
Apr 2023 13:29:23 +0100 (BST)
Received: from localhost (unknown [106.210.248.243]) by eusmtip2.samsung.com
(KnoxPortal) with ESMTPA id
20230411122922eusmtip22c05afaf469dd0ad10bc0ac238306b53~U4TFSq8M32761927619eusmtip2k;
Tue, 11 Apr 2023 12:29:22 +0000 (GMT)
From: Pankaj Raghav
To: hubcap@omnibond.com, brauner@kernel.org, martin@omnibond.com,
willy@infradead.org, hch@lst.de, minchan@kernel.org,
viro@zeniv.linux.org.uk, axboe@kernel.dk,
akpm@linux-foundation.org, senozhatsky@chromium.org
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org,
linux-block@vger.kernel.org, gost.dev@samsung.com,
mcgrof@kernel.org, Pankaj Raghav
Subject: [PATCH v3 1/3] orangefs: use folios in orangefs_readahead
Date: Tue, 11 Apr 2023 14:29:18 +0200
Message-Id: <20230411122920.30134-2-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230411122920.30134-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrGKsWRmVeSWpSXmKPExsWy7djP87qLg0xTDJqvyVnMWb+GzWL13X42
i9eHPzFa7N88hcni5oGdTBYrVx9lsmi/28dksfeWtsWevSdZLC7vmsNmcW/Nf1aLk+v/M1vc
mPC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pnkn8TKJFD2oyXnkFbD8h2CWzUX+6mOq1Vfe+Bl0o9evQuBo62aXz56Wy
pD2TXpp0qV9fffT1PlZHs9opi+X0GpnYZq9UYinOSDTUYi4qTgQAQYdjlmgDAAA=
X-CMS-MailID: 20230411122923eucas1p27e097fa66db8e166d14658bc7c6f180b
X-Msg-Generator: CA
X-RootMTR: 20230411122923eucas1p27e097fa66db8e166d14658bc7c6f180b
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230411122923eucas1p27e097fa66db8e166d14658bc7c6f180b
References: <20230411122920.30134-1-p.raghav@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:
X-Mailing-List: linux-kernel@vger.kernel.org
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
X-GMAIL-THRID: =?utf-8?q?1762883187591908823?=
X-GMAIL-MSGID: =?utf-8?q?1762883187591908823?=
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.
Reviewed-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
Tested-by: Mike Marshall
Signed-off-by: Pankaj Raghav
---
fs/orangefs/inode.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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);
}
}