From patchwork Mon Apr 3 13:22: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: 78558
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2314131vqo;
Mon, 3 Apr 2023 06:46:06 -0700 (PDT)
X-Google-Smtp-Source:
AKy350a+z7fDE54rgC3VsyXBRJMNxWqq4anU5DFYjDz8x6SsDsCna3oE6uFhSsKdajuA4/awexmj
X-Received: by 2002:a17:906:4ac4:b0:921:412b:d8c1 with SMTP id
u4-20020a1709064ac400b00921412bd8c1mr35792608ejt.71.1680529566544;
Mon, 03 Apr 2023 06:46:06 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1680529566; cv=none;
d=google.com; s=arc-20160816;
b=saALh7XBBfR7XIRfZNo6p4hG63PQroVuJ8lHJTIudi9qhjfj7NX7IAcJqyowtVFitJ
byTs7QNRB42Uq5kD+VhQIXpG16CoSdhtcsrkWvDVLOFkNvWNnQjB+VpLr6UQ3bdbWZ7L
9ElYpfLM0cIU6SzWsJ1KvwAwuCLzNfT2WwFhhnOAUk0ubwaStV502Eyx2JDCe5NUqxHZ
4lu6Xo4Czd6VeuhD/TAghelMvPUQe7qnk0OTSYfp9+5gjbUsR0vHjv0XFKKyfAiaSGbR
D2aqfwuilQP+eIPSDIFeiv4NUT2arlnRGd5sa91d1KaWF8kl3kaLaiVuYcPYyav+voo7
2stw==
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=cv+Hj0FwPtC3HT2R3DDLLPaYMWixtk1Tvm8cFC27+6k=;
b=OXOc9kNA1ydpBgF2ptAUhq57JgablvjeJz1zbvSt2eM/e//9E+h+IhUMZep2zsgA0Z
wtroHnhnXuZE4D463QD/SDnXD9y25Lpo86Efcdy1jh4PPqyuBFhA6s4l1EIMEfW2nZyE
M086cs/VesMRvcxMgK7nPgONuDiOB3FPtelzHgjCnk/5pvRYRNqqiRtreYTtMZBg6Shk
2L5h5EieU86u8AirI8HH+Sqxfl90kvUJ10hhQdLxwvvat4F4wpyP692meJd252gCS97/
n81izVhpXAbMIvaA++5Zubm28EJtE7Il74xiMNCxWWaNEXOESwMExfpvSML3H68iZNMS
vKOA==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@samsung.com header.s=mail20170921
header.b=B39O5prH;
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
u13-20020a056402064d00b00501da7bdea9si547202edx.228.2023.04.03.06.45.42;
Mon, 03 Apr 2023 06:46:06 -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=B39O5prH;
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 S232324AbjDCNWl (ORCPT + 99 others);
Mon, 3 Apr 2023 09:22:41 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47926 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S232366AbjDCNWb (ORCPT
);
Mon, 3 Apr 2023 09:22:31 -0400
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A88E043
for ;
Mon, 3 Apr 2023 06:22:28 -0700 (PDT)
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230403132226euoutp0105a1e57c6b7bd57f49077e0a84d7df88~Sb3IIAKEz1624016240euoutp01E
for ;
Mon, 3 Apr 2023 13:22:26 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230403132226euoutp0105a1e57c6b7bd57f49077e0a84d7df88~Sb3IIAKEz1624016240euoutp01E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680528146;
bh=cv+Hj0FwPtC3HT2R3DDLLPaYMWixtk1Tvm8cFC27+6k=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=B39O5prHjZY0V7xuyRpKWUkJhlL0o/dYBrAbqOAY8Wj+XGSawtVbwCkB8ZooCJsVK
sjQbZYJgRELCcwxoaywLcVa6kbH5RSuTWfojHZ9KvOLyiRXK0u/fhvXXZLIa8Ws2iB
R4O4ttoX5iWGfhcl5DnEgDqA/34PsVWAMkCn8fLw=
Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by
eucas1p1.samsung.com (KnoxPortal) with ESMTP id
20230403132224eucas1p1dd063339ab3dd7e50f716c30dfa6c3d7~Sb3Gm84Sm0205602056eucas1p1F;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges3new.samsung.com (EUCPMTA) with SMTP id F9.F9.10014.013DA246;
Mon, 3
Apr 2023 14:22:24 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20230403132224eucas1p28f82802bc40d4feb5a30bb59c6536ab3~Sb3GIDjiU1827918279eucas1p2r;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20230403132224eusmtrp2743cb3eb410ee96b9ce1aef1859b792d~Sb3GHEWDm0200802008eusmtrp2K;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
X-AuditID: cbfec7f5-b8bff7000000271e-c8-642ad310e985
Received: from eusmtip1.samsung.com ( [203.254.199.221]) by
eusmgms2.samsung.com (EUCPMTA) with SMTP id 35.ED.09583.013DA246;
Mon, 3
Apr 2023 14:22:24 +0100 (BST)
Received: from localhost (unknown [106.210.248.30]) by eusmtip1.samsung.com
(KnoxPortal) with ESMTPA id
20230403132224eusmtip1acb8b48c14dc2c7e83cb18c349594e39~Sb3F5SUdL2319123191eusmtip1F;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
From: Pankaj Raghav
To: axboe@kernel.dk, minchan@kernel.org, martin@omnibond.com,
hubcap@omnibond.com, brauner@kernel.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, akpm@linux-foundation.org,
willy@infradead.org, hch@lst.de
Cc: devel@lists.orangefs.org, mcgrof@kernel.org,
linux-block@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, gost.dev@samsung.com,
linux-fsdevel@vger.kernel.org, Pankaj Raghav
Subject: [PATCH v2 2/5] orangefs: use folios in orangefs_readahead
Date: Mon, 3 Apr 2023 15:22:18 +0200
Message-Id: <20230403132221.94921-3-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230403132221.94921-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA02SfUxbVRjGc+5tb28LbS6FjBdsmHQhxo5P0eSg6EBJvENJ/GPLUGegGTes
o+WjBb+2aJFFXJ2MTCcTqizMCYNqpYyNFnATNhHHx7Y6B0yYwWIm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V/OqJ3rZL25H3PHi8y8OV37mfqV899l3PAbqmA
WvoxNfOGvZav762ZKbtJ/EGHVq7elQAF11leb6ZU3Pz8LOyAqwK74BYpJ2/HR1cab/4OdnRZ
MuWqGFOz2CzjeynHKpymrpu4b8m61GAlluKMREMt5qLiRADatwx8awMAAA==
X-CMS-MailID: 20230403132224eucas1p28f82802bc40d4feb5a30bb59c6536ab3
X-Msg-Generator: CA
X-RootMTR: 20230403132224eucas1p28f82802bc40d4feb5a30bb59c6536ab3
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230403132224eucas1p28f82802bc40d4feb5a30bb59c6536ab3
References: <20230403132221.94921-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?1762162970700535998?=
X-GMAIL-MSGID: =?utf-8?q?1762162970700535998?=
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)
Tested-by: Mike Marshall
Signed-off-by: Pankaj Raghav
Reviewed-by: Christoph Hellwig
---
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);
}
}