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: 70210 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2320574wrd; Wed, 15 Mar 2023 06:12:26 -0700 (PDT) X-Google-Smtp-Source: AK7set+J0DnvzN5LA/5DtmaohTEtrfhUhUGaETRD6wk3uWHA51ZgtVxw3q2M9oQmZbYEK9utMqnl X-Received: by 2002:a62:4dc6:0:b0:624:6fdf:b36e with SMTP id a189-20020a624dc6000000b006246fdfb36emr8900835pfb.28.1678885945731; Wed, 15 Mar 2023 06:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678885945; cv=none; d=google.com; s=arc-20160816; b=H55gxxvtp7u6eXAfObovJPhnoCrtSUC0GQUbQVT38WUW9Xh27HJPorp9iBa343bg6g ms9nNAHFDg6pUk0hPTb1rECgGHDCsfMKHp3/mXKi1ya8kqNAxTMoXSdaosj6+751dqSg b4blFq7wL9D16gSrkoVgz3fmZCtKDsCalxs1xJ3EUyxDpKCnWJyVwkpzPm5Plb9htw5U XbhjRFbgd0hSv9S6nhEZrWiA3HYGU7GMtQQJuMkDD56A/ShaVBQOgFoESDRxGQbBGjAH p6UddbcebPe5GKVOz/YD+abiLK0zgwgXHM0jJjChr37bSJG82MhVgBGhd/EmCUNwhRO/ JYwQ== 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=TULy0kQ0Ifdivo2QO7TanxedWWhPvjo0gfRuQDzW2ng=; b=YxrS8VN4Aqm0Qk0GcCdMcIjWN+A7DPMUXMbWlaR9E8Cr4RnCmGv8ddmXTSR/YOVI3X oXGuhQQn/ExbAtByYIySAbkuYVDy6opA1kO5DPD3o4EJ9wKGkr2usXSQMKj1Sy+Ph4HR ZSp7bG8GrvoWmMzV2oc/NOtxitFzStYghvFTWlklZ43wp5LvvRTKlt2gxPw0cCO2kNsc mCrjDkfoCteE1WdgbzSqXhO5/djB/yqxeSua2GfFMjQhiiOYOSopDqC6MIm8iRhi/2zy /9OxCmLp2fAcQFb75rTNmXtq5tq/txqnvOuGCK3wff4t+Yv12qye5kwiHFTk+owjSBr7 GiTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="WG5nv/yI"; 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 z123-20020a623381000000b005a8c0dc91dfsi4755460pfz.337.2023.03.15.06.12.11; Wed, 15 Mar 2023 06:12:25 -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="WG5nv/yI"; 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 S232804AbjCOMfb (ORCPT + 99 others); Wed, 15 Mar 2023 08:35:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232570AbjCOMfI (ORCPT ); Wed, 15 Mar 2023 08:35:08 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 714225D766 for ; Wed, 15 Mar 2023 05:33:36 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230315123238euoutp0271741289e1b665298cc166c27e25e418~Ml7N1VJQZ2729527295euoutp020 for ; Wed, 15 Mar 2023 12:32:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230315123238euoutp0271741289e1b665298cc166c27e25e418~Ml7N1VJQZ2729527295euoutp020 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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bd03dd267b9f8eb8 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,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, URIBL_BLOCKED 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?1760439509098292678?= X-GMAIL-MSGID: =?utf-8?q?1760439509098292678?= 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); } }