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: 13198167 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 6C364C76196 for ; Mon, 3 Apr 2023 13:22:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B87AF6B0074; Mon, 3 Apr 2023 09:22:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9BB3D900005; Mon, 3 Apr 2023 09:22:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D41C900002; Mon, 3 Apr 2023 09:22:32 -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 33BB96B0078 for ; Mon, 3 Apr 2023 09:22:32 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0264B120629 for ; Mon, 3 Apr 2023 13:22:32 +0000 (UTC) X-FDA: 80640144144.17.F368480 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by imf02.hostedemail.com (Postfix) with ESMTP id 85E458000C for ; Mon, 3 Apr 2023 13:22:28 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=B39O5prH; spf=pass (imf02.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=1680528148; 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=cv+Hj0FwPtC3HT2R3DDLLPaYMWixtk1Tvm8cFC27+6k=; b=YBfSiEDFnwHe3V5Joho9o4j3xu9GN7ywDpgj2MVHzLUudqg3ToJoY7WMNTAGZE06hTXl01 OVukuinyl5sUvNBQorGDMdly5S02h5RkKLsiQ41ctLjlDkqO0QeTAJ2SHUhI2djVHunUiW HPGQQA0cgUvno9e0sd6ox3D9swbqK/k= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=B39O5prH; spf=pass (imf02.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=1680528148; a=rsa-sha256; cv=none; b=MyCctCOVH+ZVCfuOR0k/MtnPHV1Rd+4YFHokFazsj61Xd6mHgq/zKk8Pcpl8wgOs4O2JtU H2e9FSA0QPIsYbYoHbHT/i7WsW4ppNP3+io0aIXnKrltPJwK2S+HtRvl40bP4BZ1FwNsHR K3HP+KUFB4qRBrv7QvHWD/rqb59drqE= Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230403132226euoutp015384ec7c3ed392b61e80d94b8cae5229~Sb3IC-UM61624916249euoutp015 for ; Mon, 3 Apr 2023 13:22:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230403132226euoutp015384ec7c3ed392b61e80d94b8cae5229~Sb3IC-UM61624916249euoutp015 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+2aJFFXJ2MTCcTqizMCYNqpYyNFnATNhHHx7Y6B0yYwWImH+2EEgsE6srt4v77vec8 z/ucJzk0Kf9bGE1riss5fbFaq6QkgvM/rYwmME5VQXKLNxmbrRYKt00eo/Bc/yLCFzs+I/D4 JTuBz7ZdIXD1ZA2Beye2457eQQF2OswUnrL4hXjQ6ifxWO0Mwt8se0R46cxhEe5ub6Lw6PqA EK/5zFSGnG0wXhewHS0q1jlcwdpaj1CsbfG4iP355JqANZ6YoNjucSPFrt7+XcjWnGtF7JIt hrW5FohXQl+TpBdwWs2bnD7puXzJ/mvVnWSpU/L2qmlRZES3aRMS08A8CQ6fhzIhCS1nWhA0 Tp8i+MGLoGv8uogflhB4710jH1gWTHNBSzMCu/sm4oe7CC5M24UmRNMUo4LKI5vuCGYCwfzR hs29JHMHwVfdvURgVTjzPJjrbgkDLGDioGrkXxRgKZMG89UnBHzcVrj44/BmtJh5Girrvgxq wmDwC9emhryvqepsIAMBwFwQw8ySB/HmLOi5+rmQ53CYHTgn4l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TeDVeAijg4 2AS0JBo72UHiIiDxZReOs4A4zALPGSXWTPnNDNItLOAkMWf6dVYQm0VAVaL53HewqbwClhJv 2qeyQGyQl9h/8CxYPaeAlUTj9LlgNUJANV8v3mKFqBeUODnzCVg9M1B989bZzBMYBWYhSc1C klrAyLSKUSS1tDg3PbfYSK84Mbe4NC9dLzk/dxMjMIq3Hfu5ZQfjylcf9Q4xMnEwHmKU4GBW EuFV7dJKEeJNSaysSi3Kjy8qzUktPsRoCnT3RGYp0eR8YBrJK4k3NDMwNTQxszQwtTQzVhLn 9SzoSBQSSE8sSc1OTS1ILYLpY+LglGpgcilVf7KCv+Lyc/6jD2JqbHY0XMnU0pn2dG/oFBvj dTsktU4r2bfY74izZbxxUbaxzv/BLhvR54YWTzrONwrx83T4Hvwad+eOF39h2uKjrxVOCQto nnHr5pB5L6U0tasvlX/OOh1fRc0bkmn+cdqax3m/Hz4o6BnBfn2yIr/3kew6tqoF2TIT4+sD 5Bu7p+h83uXn/P3OTCZjtereyvd/FjNOOGV/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-Rspamd-Queue-Id: 85E458000C X-Stat-Signature: 5brdu5yjknt89rcfn59qktkjs8bzatk6 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1680528148-239384 X-HE-Meta: U2FsdGVkX1+GWaVQMcVcAvUDpr8WRpLXT56kP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Xz5iRylV0HcgiwP6PkwRHGfBqkcuij5+Ye0 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: 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); } }