From patchwork Wed Mar 15 12:32:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 13175779 Return-Path: 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 B01E4C6FD1D for ; Wed, 15 Mar 2023 12:32:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C72156B007D; Wed, 15 Mar 2023 08:32:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BAB2F6B007E; Wed, 15 Mar 2023 08:32:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FDB96B0080; Wed, 15 Mar 2023 08:32:43 -0400 (EDT) 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 8B2A76B007D for ; Wed, 15 Mar 2023 08:32:43 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5A292120D40 for ; Wed, 15 Mar 2023 12:32:43 +0000 (UTC) X-FDA: 80571071406.18.CFBE94D Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by imf09.hostedemail.com (Postfix) with ESMTP id D2781140025 for ; Wed, 15 Mar 2023 12:32:39 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b="WG5nv/yI"; spf=pass (imf09.hostedemail.com: domain of p.raghav@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com; dmarc=pass (policy=none) header.from=samsung.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678883560; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TULy0kQ0Ifdivo2QO7TanxedWWhPvjo0gfRuQDzW2ng=; b=MUA2r0+gMJLKd+cvSEHzFvTlyXpwpbvs7Ezdz3822VBU2zDJBGauHsxgoW1/Mwa8Q1aa/3 Rb9mLTosVVP341XcBnm9rLkF/1titN4RUdNHwVTS1f8/jATs7E0HfKhCuEGE1gyWWMZU7/ sz3Njiq7QcAqjrw9n+I7sJiNrElpYUg= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b="WG5nv/yI"; spf=pass (imf09.hostedemail.com: domain of p.raghav@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com; dmarc=pass (policy=none) header.from=samsung.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678883560; a=rsa-sha256; cv=none; b=cL5wI2C+KuDhijyeOXSac1wMo9QXKn77YztOq38ajcGoOAHQWsItJpxFGUm9f82hpf89JJ I+uiT78oecDiGmAahaMtl/gMOeFesA5lzmiyh3HBbv+12JbhyoCV9fWmphC9pL3F3qpUGD mMsHKw3FTD/rggN2cxflMrptBqkGDnU= Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230315123238euoutp01a64422437f25c84c715ed37923cb4ba0~Ml7NzIziW2676026760euoutp01F for ; Wed, 15 Mar 2023 12:32:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230315123238euoutp01a64422437f25c84c715ed37923cb4ba0~Ml7NzIziW2676026760euoutp01F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1678883558; bh=TULy0kQ0Ifdivo2QO7TanxedWWhPvjo0gfRuQDzW2ng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WG5nv/yIUioUZMemmI/vXGBGCC4mPMP4y7q7hrLObungT2ku5O7R3EVoS3PfQSHj3 I8MTWMnapaCRQJHG/BY21xHO7gKzTp9LHWWniksNA49VFZcApTLwGa93cuuQGrIhsO o/AjQ5qm6e1N7LRsiufjhXZOGYU4eNMfrw8QvWkw= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230315123236eucas1p26b7742c95fa09b82c73c845d74efce5e~Ml7MbQpp61818518185eucas1p2w; Wed, 15 Mar 2023 12:32:36 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 21.94.10014.4EAB1146; Wed, 15 Mar 2023 12:32:36 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230315123236eucas1p1116e1b8537191310bd03dd267b9f8eb8~Ml7MCxzO32770827708eucas1p15; Wed, 15 Mar 2023 12:32:36 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230315123236eusmtrp1df4436f51fa48eb1490ddbb6b35c616f~Ml7MBtYA-1056310563eusmtrp13; Wed, 15 Mar 2023 12:32:36 +0000 (GMT) X-AuditID: cbfec7f5-ba1ff7000000271e-6e-6411bae42153 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D1.BF.09583.4EAB1146; Wed, 15 Mar 2023 12:32:36 +0000 (GMT) Received: from localhost (unknown [106.210.248.172]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230315123235eusmtip24e5b07e7103e1457f04af28b9d08add0~Ml7LyK5g50183701837eusmtip2M; Wed, 15 Mar 2023 12:32:35 +0000 (GMT) From: Pankaj Raghav To: hubcap@omnibond.com, senozhatsky@chromium.org, martin@omnibond.com, willy@infradead.org, minchan@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, axboe@kernel.dk, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, gost.dev@samsung.com, mcgrof@kernel.org, devel@lists.orangefs.org, Pankaj Raghav Subject: [RFC PATCH 3/3] orangefs: use folio in orangefs_readahead() Date: Wed, 15 Mar 2023 13:32:33 +0100 Message-Id: <20230315123233.121593-4-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230315123233.121593-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDKsWRmVeSWpSXmKPExsWy7djP87pPdgmmGOz8o2gxZ/0aNovVd/vZ LF4f/sRosX/zFCaLmwd2Mlm03+1jsth7S9tiz96TLBaXd81hs7i35j+rxcn1/5ktbkx4ymix 7Ot7dovPS1vYLXZvXMRmcf7vcVaL3z/msDkIesxuuMjisXmFlsfls6Uem1Z1snls+jSJ3ePE jN8sHg1Tb7F5/Lp9h9Wjb8sqRo/Pm+Q8Nj15yxTAHcVlk5Kak1mWWqRvl8CVceTGE8aCPRwV Px+zNjB+Y+ti5OSQEDCRWNYxkRXEFhJYwSjx4112FyMXkP2FUWLzvodsEM5nRokHH1qZYTr+ 7L/GBNGxnFFie781RNFLRokD6x8DdXBwsAloSTR2soPERQTOMEo8aZkINolZ4D6jxPWm3+wg 3cICLhIXN60Bm8oioCpx78tnMJtXwEqi4clLqPvkJfYfPAsW5xSwlli9cjobRI2gxMmZT1hA bGagmuats5lBFkgIrOaU+PH5GdSpLhJ3n+1ggbCFJV4d38IOYctInJ7cAxWvlnh64zdUcwuj RP/O9WAvSABt6zuTA2IyC2hKrN+lD1HuKNF19wk7RAWfxI23ghAn8ElM2jadGSLMK9HRJgRR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VRMOTl1BnyEvsP3gW LM4pYC2xeuV0sLgQUM39e7uYIOoFJU7OfMICYjMD1Tdvnc08gVFgFpLULCSpBYxMqxhFUkuL c9Nzi430ihNzi0vz0vWS83M3MQLjdduxn1t2MK589VHvECMTB+MhRgkOZiUR3nAWgRQh3pTE yqrUovz4otKc1OJDjKZAd09klhJNzgcmjLySeEMzA1NDEzNLA1NLM2MlcV7Pgo5EIYH0xJLU 7NTUgtQimD4mDk6pBqad3btWbtv3zqCizPyUK0t4RO/fhdvV/19bHR/DN/lp0xWxNUnJogJz dZ89uhN5yOXb41NyT00XXz+meGO6a8r9eXndm1kMrNj+1OSuXfDq1blnD4pZA9+FmTa8/fT4 80yJ7Ukuzn9ybkWtFbSt4+lkjN6rfOLCbCm9jZv7Cw5Z30irqqvn5ig42/fSbXKcb69E/KNb u/qYlPxfpRwr4L660PvOUpW0yCtS87cn8fCc3LfTx/iC0pcNC8XFn6/J/SP8/2SM55qmzT+8 Hm+XuK8scCuz5ROLy33Wh/2OR5YxsSZeLHH0+i0peFJ2RdIy128XjxctblwhXHBVKOKP0bnD HQonuJ5OM3Z2PrdSOmmjEktxRqKhFnNRcSIAw1K8PGADAAA= X-CMS-MailID: 20230315123236eucas1p1116e1b8537191310bd03dd267b9f8eb8 X-Msg-Generator: CA X-RootMTR: 20230315123236eucas1p1116e1b8537191310bd03dd267b9f8eb8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230315123236eucas1p1116e1b8537191310bd03dd267b9f8eb8 References: <20230315123233.121593-1-p.raghav@samsung.com> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: D2781140025 X-Rspam-User: X-Stat-Signature: gu1m1ecu1ecjqt8mhaaidep1ym87hrna X-HE-Tag: 1678883559-794798 X-HE-Meta: U2FsdGVkX19JHEHE8h34Zu4XFVaFvCAN8CYtU3u3+Uu7iZ7XcU8vYseE0pX3rAq6wdJdk/vIwys/yTLa7VwuM/XUFhuhL59l63U4Onj22tIIhWEj5BJ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2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Use folio and its corresponding function in orangefs_readahead() so that folios can be directly passed to the folio_endio(). Signed-off-by: Pankaj Raghav Reviewed-by: Luis Chamberlain --- fs/orangefs/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index b12d099510ea..7e03d60bd406 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,9 @@ static void orangefs_readahead(struct readahead_control *rac) ret = 0; /* clean up. */ - while ((page = readahead_page(rac))) { - folio_endio(page_folio(page), false, ret); - put_page(page); + while ((folio = readahead_folio(rac))) { + folio_endio(folio, false, ret); + folio_put(folio); } }