From patchwork Tue Mar 28 11:27:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 76017 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2152996vqo; Tue, 28 Mar 2023 04:52:30 -0700 (PDT) X-Google-Smtp-Source: AKy350Z5CAfg4fRgVe1W3LYwNViCI53V+Q9wY7fHO4Jz6UXg9Rw8Wl9M8AtSaKL/0nr65MYCJ1la X-Received: by 2002:a17:906:9619:b0:922:446b:105a with SMTP id s25-20020a170906961900b00922446b105amr14742503ejx.19.1680004350047; Tue, 28 Mar 2023 04:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680004350; cv=none; d=google.com; s=arc-20160816; b=b7PqFnprEdSP5//rVhJLw2nbXoktRlx6gnYXbbeiSGndyjGP3AO4WVKh9FmwefMEr4 MlIQ0AOA0QvI/SxL6EmXjhBeHvBY7S0Hkotqjy3xrSK8e595TAG8CB37/Lma4VsCC6AT vK66u13U+ZJmdzP1wmAgUku+5ZCEL3j2QOcLWlhzCd0/JpT3tW30aTX2mmOVfmOW6kDQ BGfl7cHvzOkM4Zc5zhSawwyoO+ugSLyeJBoJnmqTekz6zJNx0O9jFEwZXUp7YFSLy/So ydEK5hhk90bvC2r09BP4P5fBQvJXw9GLxIWZ+2bXma+kaoWwnfa8uZR//GfAPG1HJzNv Pqog== 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=V4uAY23rx6LbYgOeA+xAE8iXiLJZoHXfAuLkczsvSEk=; b=qQL11Y3VVoNageXIO5BlMpngKhLmbosQ7RHhof+daJ5/St437fIKa/Wmj55QVlrniH 8izp8io8VLTQaYbaE3g4Il7KT52gvSeIAR+RXHxQrekAuiIipZflUfo2bZ7LlwJwxxmP nIFmHh9ndO+Lc1GV/sYRlp1b8B6KWh/JpCnpOtFB486F5rApp8/rSktyzNgfFL0rjwDu DJB4fmt41538lAcbPW8+2B0b9lGzp+KCNVC+GCtQeZaghg5XWLmJ8MIv3Xo4ic2yii94 3lZDWViuBfQhINSItPTGXgvZWsPCawZQrYJ9m9j1zFDXR9CpP7dmcFNf/+g6kESfJgSL GDhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=g693ybUR; 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 n8-20020a170906b30800b0093182033b89si29989606ejz.711.2023.03.28.04.52.06; Tue, 28 Mar 2023 04:52:30 -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=g693ybUR; 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 S232750AbjC1L1f (ORCPT + 99 others); Tue, 28 Mar 2023 07:27:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229924AbjC1L11 (ORCPT ); Tue, 28 Mar 2023 07:27:27 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F02151725 for ; Tue, 28 Mar 2023 04:27:22 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230328112720euoutp02d90d9589d523f3e9ace674ea1cfc5a3c~Qka66aPsT3247732477euoutp02j for ; Tue, 28 Mar 2023 11:27:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230328112720euoutp02d90d9589d523f3e9ace674ea1cfc5a3c~Qka66aPsT3247732477euoutp02j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1680002840; bh=V4uAY23rx6LbYgOeA+xAE8iXiLJZoHXfAuLkczsvSEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g693ybURzQsLeFqRIYnYKiIo8yQ5CSmuybp+IfxL5pizPUyGj5Xjvcc47ckjr6oE+ EZp90lFWAUo/dtTnIQq4K++4Nw8sJMVdCasU2R8ZIatq3y1Sdasl5IXoX/tb3BhFNt 2fdzj4sATJg3SRSu4rcTvDpIZF19GYjbawOxHtBY= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230328112718eucas1p2a740048df8ba642e0aa035d009115284~Qka5NmZGW2759927599eucas1p28; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 34.51.09503.61FC2246; Tue, 28 Mar 2023 12:27:18 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230328112718eucas1p214a859cfb3d7b45523356bcc16c373b1~Qka44T5zZ0111901119eucas1p2j; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230328112718eusmtrp16f41b0a32e8b05be0788a2ac4a06450a~Qka43kbO80876308763eusmtrp1S; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) X-AuditID: cbfec7f2-e8fff7000000251f-78-6422cf16dae4 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id FD.19.08862.61FC2246; Tue, 28 Mar 2023 12:27:18 +0100 (BST) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230328112718eusmtip24e9e179b1b56e4e1504088728ba93515~Qka4o8oxA2590125901eusmtip29; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) From: Pankaj Raghav To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org, akpm@linux-foundation.org, hubcap@omnibond.com, willy@infradead.org, viro@zeniv.linux.org.uk, senozhatsky@chromium.org, brauner@kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, mcgrof@kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org, Pankaj Raghav Subject: [PATCH 1/5] zram: remove the call to page_endio in the bio end_io handler Date: Tue, 28 Mar 2023 13:27:12 +0200 Message-Id: <20230328112716.50120-2-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLKsWRmVeSWpSXmKPExsWy7djP87pi55VSDO5u0bWYs34Nm8Xqu/1s Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4uT6/8wWNyY8ZbRY 9vU9u8XnpS3sFrs3LmKzOP/3OKvF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrg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b45523356bcc16c373b1 X-Msg-Generator: CA X-RootMTR: 20230328112718eucas1p214a859cfb3d7b45523356bcc16c373b1 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230328112718eucas1p214a859cfb3d7b45523356bcc16c373b1 References: <20230328112716.50120-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?1761612241444051081?= X-GMAIL-MSGID: =?utf-8?q?1761612241444051081?= zram_page_end_io function is called when alloc_page is used (for partial IO) to trigger writeback from the user space. The pages used for this operation is never locked or have the writeback set. So, it is safe to remove the call to page_endio() function that unlocks or marks writeback end on the page. Rename the endio handler from zram_page_end_io to zram_read_end_io as the call to page_endio() is removed and to associate the callback to the operation it is used in. Signed-off-by: Pankaj Raghav --- drivers/block/zram/zram_drv.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index b7bb52f8dfbd..3300e7eda2f6 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -606,12 +606,8 @@ static void free_block_bdev(struct zram *zram, unsigned long blk_idx) atomic64_dec(&zram->stats.bd_count); } -static void zram_page_end_io(struct bio *bio) +static void zram_read_end_io(struct bio *bio) { - struct page *page = bio_first_page_all(bio); - - page_endio(page, op_is_write(bio_op(bio)), - blk_status_to_errno(bio->bi_status)); bio_put(bio); } @@ -635,7 +631,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec, } if (!parent) - bio->bi_end_io = zram_page_end_io; + bio->bi_end_io = zram_read_end_io; else bio_chain(bio, parent); From patchwork Tue Mar 28 11:27:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 76012 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2146011vqo; Tue, 28 Mar 2023 04:38:56 -0700 (PDT) X-Google-Smtp-Source: AK7set+YjRUIxfIS9VnMnKG7915ONKMu3MV6wl9gBzS98vgOGyh4JL6pWqacn2CSi4rApU88o/dV X-Received: by 2002:a05:6a20:6692:b0:da:4e05:768 with SMTP id o18-20020a056a20669200b000da4e050768mr15016116pzh.38.1680003535839; Tue, 28 Mar 2023 04:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680003535; cv=none; d=google.com; s=arc-20160816; b=JuwgM6DVFG/5zIQPOWVaOHmdtbxke9kS2vxez/tLAzP37G2zmymbzWGK592AP7wNyR sQOdp8Jwg8Dw7uYZ3gqsrSeM8MFejjERsM/exIdxzhA0Y+pnA4MnUSHq8QRwy4lk5nOt FofamJkAVHapxzFN5gWGFfWhDmcPK7d1jzCtao72TDulX2SY79z4eTjwwFAonzl5dbAm X/RexAy/qZN+WNYKC5nCxB5D7r30IiJcCfeFdNECl4VViefDUDvN7etqYBmcJQjGcMYX N8FCSwI5REgRRNyet6UvqH7zqYm+I9VGGdYsuwHJwCEfAErh/1IX0TrfZyXYeYgcs3uc afMw== 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=CdQ/QAA4HUstxavQOVZ/jTlQypv2+dxHUXTfyjJfsFQ=; b=ukVjPBy+IRKX4RnDHSVoCx0PyyEVswWtO9wSH+ktMmzmHC+XnPA4XaFpMg+8Q733YN wSpUpQSxdYKpgbN3VjC7i76BYg6uSerloTaTjdV7VEmk3ZAK8a16trM3BQ66bqk6ZBGt g6TxhZjAq+U7EPCv4xnzfx7xUjV6HhpVUpoXJvnfbS4OseX/eX9LtkE0lzIm1ffO4/a0 YFIpG4Blxeaya+bQpKrUuoD/2ccNCQgn1NoreVP+UZju1CU1xn41BqyQ1ZV4gj/TuMBP 1RsaxPImW3Q6mGg3FUaGfRB2+LmslJxjuKdoYJthpPjSimrQEgA16wz0hQSSUYEQmoSY LWqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VlzGtKbK; 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 s1-20020a63dc01000000b0050fb412dcc2si17511666pgg.380.2023.03.28.04.38.43; Tue, 28 Mar 2023 04:38:55 -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=VlzGtKbK; 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 S232170AbjC1L1l (ORCPT + 99 others); Tue, 28 Mar 2023 07:27:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232640AbjC1L1a (ORCPT ); Tue, 28 Mar 2023 07:27:30 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 663352D40 for ; Tue, 28 Mar 2023 04:27:28 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230328112721euoutp02217e0b587a2c2b6659a0ad8669b7ca6c~Qka7XmqqW3158631586euoutp02y for ; Tue, 28 Mar 2023 11:27:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230328112721euoutp02217e0b587a2c2b6659a0ad8669b7ca6c~Qka7XmqqW3158631586euoutp02y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1680002841; bh=CdQ/QAA4HUstxavQOVZ/jTlQypv2+dxHUXTfyjJfsFQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VlzGtKbKqfX+5cBNh5Hh7eQh+UnR46lbFD2VmnTOtRDIpE6gKEtgCRlBFqS2RIXKI s7aYIGYbJplH+ki6LLrAEkWShD65oAX4NuiIKVfnxUopgZLDdbiZX6TZjLBCc5HkaO 2kjH53fd4S6va4PhcQ6VD62owlvOgtpt4UgtmNBI= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230328112719eucas1p10474fc62f4ae26a7ac767e7ac1743a89~Qka50krkB2133321333eucas1p1P; Tue, 28 Mar 2023 11:27:19 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id A8.01.09966.71FC2246; Tue, 28 Mar 2023 12:27:19 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497~Qka5WYQr60534405344eucas1p2V; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230328112718eusmtrp13eff014ff761dc9f74c78ad532d3ee62~Qka5VkdI00876308763eusmtrp1T; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) X-AuditID: cbfec7f4-d39ff700000026ee-21-6422cf1759f9 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 1F.19.08862.61FC2246; Tue, 28 Mar 2023 12:27:18 +0100 (BST) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230328112718eusmtip26b96643ca4ec913cd0e3480ce3a23477~Qka5JB9ZZ0051900519eusmtip2L; Tue, 28 Mar 2023 11:27:18 +0000 (GMT) From: Pankaj Raghav To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org, akpm@linux-foundation.org, hubcap@omnibond.com, willy@infradead.org, viro@zeniv.linux.org.uk, senozhatsky@chromium.org, brauner@kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, mcgrof@kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org, Pankaj Raghav Subject: [PATCH 2/5] orangefs: use folios in orangefs_readahead Date: Tue, 28 Mar 2023 13:27:13 +0200 Message-Id: <20230328112716.50120-3-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFKsWRmVeSWpSXmKPExsWy7djPc7ri55VSDJaeFbWYs34Nm8Xqu/1s Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4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+9NydEA voSNBqG79lekLwteyJx+6PNRvYsBU86yVm1YdSVP8dPE5kiD8yqaPyxyN1fYPO31OvwioELo r8vdO6fsEmbu/aeVYTpBiaU4I9FQi7moOBEAcj2KYl0DAAA= X-CMS-MailID: 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497 X-Msg-Generator: CA X-RootMTR: 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497 References: <20230328112716.50120-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?1761611387399695469?= X-GMAIL-MSGID: =?utf-8?q?1761611387399695469?= 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. Signed-off-by: Pankaj Raghav Reviewed-by: Matthew Wilcox (Oracle) --- 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); } } From patchwork Tue Mar 28 11:27:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 76016 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2152910vqo; Tue, 28 Mar 2023 04:52:19 -0700 (PDT) X-Google-Smtp-Source: AKy350YCnpNLORmZtl/LXb3Zohns1VT5hdobcRZ6gvhBu8M1lVHBfGRHjAoUvCXjYxpHFdogHiMZ X-Received: by 2002:a17:906:4b08:b0:8b1:7de3:cfaa with SMTP id y8-20020a1709064b0800b008b17de3cfaamr16352896eju.3.1680004338936; Tue, 28 Mar 2023 04:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680004338; cv=none; d=google.com; s=arc-20160816; b=uq+0TNAuCoSPZmQb3C6B/sa0BUe1w76qQ4dAiC2NyWKl/4sJ6QKfEkCHQUdsC40dOG 6BPdgHYIHYXnfGb+6RfaIxcnMvhRDQieWgDrkte7r7h+ChFndjAhlfAsYSiAaBosEflf Leg3rXBU2mLkp2T+8qIQAtJz6D9R4VllYO8WL3wZlQA1lG3ILUvv5wK3cZGd/WyE24vP FXQu0cyd0gHb83fsx1plcrTcxKzaByrlD4I6dgjBbDoo1qXOng+lG71QPi//V1KRvVVs GBiIzsnIdBFl5hIycyYUgsGjt2+b76ei4DOMRYR8JmtKocUdJpJSH0uSoUTA+zd0+60h hmtA== 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=5/+0KaEbpjyZkaLqtYLBQz1+pPqkvr1OOiQOg6+VTQI=; b=cTisUpveC6b+Yjfs6qbtNn8e2XwGL3ejWsGpjw5BVmxXtC6Dx5fZyMDMHRiLwvWbvp p7HF7VVyl/W+Yyk2Zk2Ktqb97j/6blZprPlNbryJIybv2wLLqa6XQEHdTOnmDoq7ylAU eoOtw3SORidMRXNcZcvXArwqZOLhZCvg5Q0Sac3wxXK9LbykVpKp59GZOABB5ovdhQdB NZu934yS1LAFPTRZGh67WaVYAEVJKfGwEVbxEZEaLy+2hXPKs+QxJNEl/lrA3uI5CnLY V5x5aOxqKKsDq6GD5Kb19Qv4uCxUH6ihajjC6GTh03G4eZlOE/Q5OgD5Sw7Yjs1csKV/ o1+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=X8veZPRU; 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 n16-20020a170906b31000b009267d6857ebsi29206677ejz.952.2023.03.28.04.51.55; Tue, 28 Mar 2023 04:52:18 -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=X8veZPRU; 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 S232394AbjC1L12 (ORCPT + 99 others); Tue, 28 Mar 2023 07:27:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbjC1L1Z (ORCPT ); Tue, 28 Mar 2023 07:27:25 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0D0E3C22 for ; Tue, 28 Mar 2023 04:27:22 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230328112721euoutp013b5cc971c61974993514c8ca25b83fe0~Qka8Ayd5Q0173901739euoutp01k for ; Tue, 28 Mar 2023 11:27:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230328112721euoutp013b5cc971c61974993514c8ca25b83fe0~Qka8Ayd5Q0173901739euoutp01k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1680002841; bh=5/+0KaEbpjyZkaLqtYLBQz1+pPqkvr1OOiQOg6+VTQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X8veZPRUscTbo+csuyoBzJR3U41Q+EmfypVD8wc3G9EESXJDZizknQm0BysjftENp 7A7p+glY1oSYzot0AYfTKdxnMFGYgLUMcXjGSitN+JrzARRrIZHLf3dtA6cPZ8MyYv S+79mloau2Nn8yJ7L9kJGA/quO8JGZfTHftIr/DU= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230328112720eucas1p22832e14ccc0ab8aa31019946721f05ee~Qka6fKv8z0111901119eucas1p2l; Tue, 28 Mar 2023 11:27:20 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 75.51.09503.81FC2246; Tue, 28 Mar 2023 12:27:20 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230328112719eucas1p2b0f94ad7b06990203081d2b125dfc6ac~Qka531zRT0949409494eucas1p26; Tue, 28 Mar 2023 11:27:19 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230328112719eusmtrp2e345237a90bdb05950bbce0a693b0b7e~Qka53IS6i0134701347eusmtrp2Q; Tue, 28 Mar 2023 11:27:19 +0000 (GMT) X-AuditID: cbfec7f2-e8fff7000000251f-7c-6422cf18c5ba Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 9D.71.09583.71FC2246; Tue, 28 Mar 2023 12:27:19 +0100 (BST) Received: from localhost (unknown [106.210.248.108]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230328112719eusmtip1eb2b40496aafbd97f77244d6662ebaed~Qka5ppj340337303373eusmtip1Z; Tue, 28 Mar 2023 11:27:19 +0000 (GMT) From: Pankaj Raghav To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org, akpm@linux-foundation.org, hubcap@omnibond.com, willy@infradead.org, viro@zeniv.linux.org.uk, senozhatsky@chromium.org, brauner@kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, mcgrof@kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org, Pankaj Raghav , Christoph Hellwig Subject: [PATCH 3/5] mpage: split bi_end_io callback for reads and writes Date: Tue, 28 Mar 2023 13:27:14 +0200 Message-Id: <20230328112716.50120-4-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEKsWRmVeSWpSXmKPExsWy7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xKt1J0voRz/uabUD7ZXXyO+BXT1m+/GR7Y yur/S3LW8/m+TuLiI4Ujq47JlumGFPg/sWWWtpy02WzLsquCQomCp3NlQ09v/fhXm8vv70Su dtb7weI7nPe/qk87Ev7kyuNfsV/0Ts/Ym31+ve0l8VxzD9EYYVuLs2r1C4+terNI44HQ62+V uRfag7nS8mKcdv3wkXsx1b5x742HpzVWyIoqsRRnJBpqMRcVJwIALLf4ZWgDAAA= X-CMS-MailID: 20230328112719eucas1p2b0f94ad7b06990203081d2b125dfc6ac X-Msg-Generator: CA X-RootMTR: 20230328112719eucas1p2b0f94ad7b06990203081d2b125dfc6ac X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230328112719eucas1p2b0f94ad7b06990203081d2b125dfc6ac References: <20230328112716.50120-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?1761612229728061351?= X-GMAIL-MSGID: =?utf-8?q?1761612229728061351?= Split the bi_end_io handler for reads and writes similar to other aops. This is a prep patch before we convert end_io handlers to use folios. Suggested-by: Christoph Hellwig Signed-off-by: Pankaj Raghav --- fs/mpage.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/fs/mpage.c b/fs/mpage.c index 22b9de5ddd68..3a545bf0f184 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -43,14 +43,28 @@ * status of that page is hard. See end_buffer_async_read() for the details. * There is no point in duplicating all that complexity. */ -static void mpage_end_io(struct bio *bio) +static void mpage_read_end_io(struct bio *bio) { struct bio_vec *bv; struct bvec_iter_all iter_all; bio_for_each_segment_all(bv, bio, iter_all) { struct page *page = bv->bv_page; - page_endio(page, bio_op(bio), + page_endio(page, REQ_OP_READ, + blk_status_to_errno(bio->bi_status)); + } + + bio_put(bio); +} + +static void mpage_write_end_io(struct bio *bio) +{ + struct bio_vec *bv; + struct bvec_iter_all iter_all; + + bio_for_each_segment_all(bv, bio, iter_all) { + struct page *page = bv->bv_page; + page_endio(page, REQ_OP_WRITE, blk_status_to_errno(bio->bi_status)); } @@ -59,7 +73,11 @@ static void mpage_end_io(struct bio *bio) static struct bio *mpage_bio_submit(struct bio *bio) { - bio->bi_end_io = mpage_end_io; + if (op_is_write(bio_op(bio))) + bio->bi_end_io = mpage_write_end_io; + else + bio->bi_end_io = mpage_read_end_io; + guard_bio_eod(bio); submit_bio(bio); return NULL; From patchwork Tue Mar 28 11:27:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 76020 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2160510vqo; Tue, 28 Mar 2023 05:04:36 -0700 (PDT) X-Google-Smtp-Source: AKy350btEDi9RwtDT5hEq3wY/fV6F90VgjI9EOatRMRoSVVPzncOXuNJML4sfAJ1IZVeTx0RwfNd X-Received: by 2002:a17:90a:34c:b0:23d:360:877d with SMTP id 12-20020a17090a034c00b0023d0360877dmr15579333pjf.32.1680005075724; Tue, 28 Mar 2023 05:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680005075; cv=none; d=google.com; s=arc-20160816; b=NNB3iDp57O4084cD+IC0+lvf9ucF0oHGuvO6d4mSxWDBRz6m1YVxVfjnySgz63M1Dv KVBo6HSFp6Hc+wR6AR5UTcQPpKevnWFwVqdKbtvjIU9UGXX/nn18UCiXiwk93tp6ddkC iAvxGcgTDwj2qRkZMwUHUtozLVyYc3ynpDz/YUmmMkULDwrwxEsQEi4pzgFY4B3Tkuy2 W4scWxB7rdMnH8J7myEm8g5oEat1/HIvhiUxuF1MtrHEvaBV3ZjTTWsDREuURLChwCjT vzJarNBXWGSEL8hnc7l7eOA+gf1kwquouhEJt3oD++kAQ2X1mlce2e2R3I21y49Oygfp kcwQ== 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=C4y5H34/b66lYzmCayiry+Dr/iI1gotrFjxRhbqI+PI=; b=LHBVeCRgjIAy95K/yS7LOpWSAGDMvXA9dMV4/o2JKm3W27IaCGgXs9akVvzuXX/Cfq URlyON17IskaN+HEfz3VgZTdIEaWHfWI/UVN320ZqQSCBAYWSBES22HtPjkdKOAywfTi mFVyXLOZ2RwIN08Nm3RUBmjolLS2AOdPpr6fyEJx2qhAh244gcj4jFPM6L1elyZpOyt0 vT86QmOCRuSEcWeasGujz+OsSfvqqL+C953uwfCBg/j0bDg1CFYh9+BkYb6rxDvoHMrG 1wcfCr6Ea8gSkR9uQSaQrbHmSCfOZ2sYYQZ0uhJi9g90yO5Qb/YL1Tt1t0/LY1WRcR1j 2lZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=SOQeOheN; 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 m4-20020a6545c4000000b005134ad5e99bsi6258131pgr.625.2023.03.28.05.04.21; Tue, 28 Mar 2023 05:04:35 -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=SOQeOheN; 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 S232761AbjC1L1c (ORCPT + 99 others); Tue, 28 Mar 2023 07:27:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232377AbjC1L12 (ORCPT ); Tue, 28 Mar 2023 07:27:28 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 718B3AB for ; Tue, 28 Mar 2023 04:27:26 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230328112722euoutp014414ac279b410e04c6d91dca8463fc9a~Qka83Uhao0435604356euoutp01n for ; Tue, 28 Mar 2023 11:27:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230328112722euoutp014414ac279b410e04c6d91dca8463fc9a~Qka83Uhao0435604356euoutp01n DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1680002842; bh=C4y5H34/b66lYzmCayiry+Dr/iI1gotrFjxRhbqI+PI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SOQeOheNVR3TOZRUeQLXiB9Fxu+PcuYHKieaWtx2g3+sxEx86tj7vwcSVUFDblKMz Vj9tVHIZqhGlVhs5bIfLHmUm6Q8p7o9xtBiSeHx+scxD1HY0YSnL9ots26OszOY10S VMBk19gD3UFgy+dC35ln638RaAPyCp6CALsLljU8= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230328112720eucas1p208a91e75a4df810cf7dd3781ee8559e2~Qka7MHLqp0948509485eucas1p2J; Tue, 28 Mar 2023 11:27:20 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 07.51.09503.81FC2246; Tue, 28 Mar 2023 12:27:20 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230328112720eucas1p1148c03b8664f6c212c7189454a36b796~Qka6blNGF1794717947eucas1p1w; Tue, 28 Mar 2023 11:27:20 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230328112720eusmtrp269ad4302d80bafe5b32231e8e7b2f8b3~Qka6a46bI0134701347eusmtrp2R; Tue, 28 Mar 2023 11:27:20 +0000 (GMT) X-AuditID: cbfec7f2-e8fff7000000251f-7e-6422cf189df9 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 1F.71.09583.71FC2246; Tue, 28 Mar 2023 12:27:20 +0100 (BST) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230328112719eusmtip21f0b4a5953ca974547d94cb63d3c29a0~Qka6Ka8Ob2590125901eusmtip2_; Tue, 28 Mar 2023 11:27:19 +0000 (GMT) From: Pankaj Raghav To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org, akpm@linux-foundation.org, hubcap@omnibond.com, willy@infradead.org, viro@zeniv.linux.org.uk, senozhatsky@chromium.org, brauner@kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, mcgrof@kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org, Pankaj Raghav Subject: [PATCH 4/5] mpage: use folios in bio end_io handler Date: Tue, 28 Mar 2023 13:27:15 +0200 Message-Id: <20230328112716.50120-5-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLKsWRmVeSWpSXmKPExsWy7djPc7oS55VSDK73mlrMWb+GzWL13X42 i9eHPzFa7N88hcni5oGdTBbtd/uYLPbe0rbYs/cki8XlXXPYLO6t+c9qcXL9f2aLGxOeMlos +/qe3eLz0hZ2i90bF7FZnP97nNXi9485bA6CHrMbLrJ4bF6h5XH5bKnHplWdbB6bPk1i9zgx 4zeLR8PUW2wev27fYfXo27KK0ePzJjmPTU/eMgVwR3HZpKTmZJalFunbJXBlLHh5iaVgAm/F n0v72BoY73B1MXJySAiYSNxdco+9i5GLQ0hgBaPE3R9TGCGcL4wSDw88hHI+M0rc2H+WCabl 7YwNLCC2kMByRokj32Igil4ySqzufA+U4OBgE9CSaOwEGysicIZRYvHyRjYQh1ngPqPEt5fn wSYJC9hI/Ft/ghHEZhFQlWj83sEKYvMKWEqcmjmPDWKbvMT+g2eZQYZyClhJTPttBVEiKHFy 5hOwI5iBSpq3zmYGmS8hsJpTYt2ebhaIXheJg3t3Q10tLPHq+BZ2CFtG4v/O+VDxaomnN35D NbcwSvTvXM8GskxCwFqi70wOiMksoCmxfpc+RLmjRPeBc0wQFXwSN94KQpzAJzFp23RmiDCv REebEES1ksTOn0+glkpIXG6aA3WYh8S7xm3sExgVZyF5ZhaSZ2Yh7F3AyLyKUTy1tDg3PbXY MC+1XK84Mbe4NC9dLzk/dxMjMAWe/nf80w7Gua8+6h1iZOJgPMQowcGsJMK72VsxRYg3JbGy KrUoP76oNCe1+BCjNAeLkj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7K6YI8aYk VlalFuXHF5XmpBYfYjQFOnsis5Rocj4wYeSVxBuaGZgamphZGphamhkrifN6FnQkCgmkJ5ak ZqemFqQWwfQxcXBKNTAlPHR9UXHFs9y11PaUL7v3dQnTfoFVp6P17f9F+Hx/LfOS+0W3jGj7 LDbGQ9sXXtX8XewT+m3J9YN1M2ZbKM3KWuj0yvb4Iiv+CUITebjP+X+Oj1DLMYh8vXH3SwOG H12pkpuOXl124ov8MTuWtKNZBz71HPin5Nm53LnskUXbrDn9olknAjLim49779Ap3p+xfoK2 w+XqWR8EJdY4ZrfwGER9qnGX331c4I+f5XrmlbvfNTZcqUzPWph3S5wnvLLmpXqC+KkHzuZX Xj23LzoTJWfLdL7twZOUTsOSrwu6V2r3VcbNEC+Xcur3zO/bwJjZcG1d/sZf19l36vJZ3d34 9u7iY0o/5jqG7/edP0WJpTgj0VCLuag4EQAOWOnYYAMAAA== X-CMS-MailID: 20230328112720eucas1p1148c03b8664f6c212c7189454a36b796 X-Msg-Generator: CA X-RootMTR: 20230328112720eucas1p1148c03b8664f6c212c7189454a36b796 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230328112720eucas1p1148c03b8664f6c212c7189454a36b796 References: <20230328112716.50120-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?1761613002145180726?= X-GMAIL-MSGID: =?utf-8?q?1761613002145180726?= Use folios in the bio end_io handler. This conversion does the appropriate handling on the folios in the respective end_io callback and removes the call to page_endio(), which is soon to be removed. Signed-off-by: Pankaj Raghav --- fs/mpage.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/fs/mpage.c b/fs/mpage.c index 3a545bf0f184..6f43b7c9d4de 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -45,13 +45,15 @@ */ static void mpage_read_end_io(struct bio *bio) { - struct bio_vec *bv; - struct bvec_iter_all iter_all; + struct folio_iter fi; + int err = blk_status_to_errno(bio->bi_status); - bio_for_each_segment_all(bv, bio, iter_all) { - struct page *page = bv->bv_page; - page_endio(page, REQ_OP_READ, - blk_status_to_errno(bio->bi_status)); + bio_for_each_folio_all(fi, bio) { + if (!err) + folio_mark_uptodate(fi.folio); + else + folio_set_error(fi.folio); + folio_unlock(fi.folio); } bio_put(bio); @@ -59,13 +61,15 @@ static void mpage_read_end_io(struct bio *bio) static void mpage_write_end_io(struct bio *bio) { - struct bio_vec *bv; - struct bvec_iter_all iter_all; + struct folio_iter fi; + int err = blk_status_to_errno(bio->bi_status); - bio_for_each_segment_all(bv, bio, iter_all) { - struct page *page = bv->bv_page; - page_endio(page, REQ_OP_WRITE, - blk_status_to_errno(bio->bi_status)); + bio_for_each_folio_all(fi, bio) { + if (err) { + folio_set_error(fi.folio); + mapping_set_error(fi.folio->mapping, err); + } + folio_end_writeback(fi.folio); } bio_put(bio); From patchwork Tue Mar 28 11:27:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 76013 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2146315vqo; Tue, 28 Mar 2023 04:39:38 -0700 (PDT) X-Google-Smtp-Source: AKy350a/dj0SPg9nRXxdZBKN0Uot4FYrNbclZ3Rddxpc1EyPa9JCChtPJnIp2hHHoTOcauzaZddi X-Received: by 2002:aa7:da56:0:b0:4fd:2363:16f2 with SMTP id w22-20020aa7da56000000b004fd236316f2mr12987091eds.37.1680003578604; Tue, 28 Mar 2023 04:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680003578; cv=none; d=google.com; s=arc-20160816; b=rv7hZhj/nU5mmzVQ/ByHQFoFB0fk2oGmIecYnCqbnhHkpksU4Pxc/WeaNZ1pBOkHwy wZxGPWSDCueD/fzf21cqKXG8EcCN30PxVbIOHjZmuUZ4HXKCmKCP7AONubeBPmhO714J YlIbWOwnOMTa341zxnH6BDYCY80zbxTa39A4KuzINFDG2AiR02hZJm/PQzet2vAVNelX CaTcBs6GZLUwIkrA1ZoGgQlc29vl1E7vhlvI8JZJ6f8kb1Jn2YziSY62LOpxNGMrAVx4 +WKyT3/VljPJfTjDl/TfjHh3PjVX48YPq8q0Omgle8gjPDWuwYoYJB6tifZxLPIQESBh zJdw== 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=Qd/EHq/hNi9U0eDQzSkYHva3vzVuhQ3/uVr2IhrtsQQ=; b=Cd21zPdLcLZEtbjt9eAtwQQBdbD1FX4jJUpP3trC+hBBadx0IXgvZk0jwEg5f/naCN ke2uHDjB6bMcpceRJrPWoKdIB4Pxa9alOBQmMbdSYTFdy9DNZCVZZGDCfX12YcOIzfO8 RxY1r1zcZItFjJKYGiDEMqNRdGIZB/1HE4qUoqt4A3XHzOnNBVIkysyTwB9AfcWjQINb 5zWqp/B2DB0PswuSIRmOfqVo/rtZcJZPZK+yTCorErpQKZ9BhjvZKmu1z98el/qd7XW+ vhisTS8mlP7BfiKNhTEG0dsnz2DZNiExdXOKeNpUop88qX30E8gz+25c2znKwldxWmyZ 0UHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=drjE9jpU; 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 n24-20020a05640206d800b004aaa505ac5fsi33741931edy.76.2023.03.28.04.39.14; Tue, 28 Mar 2023 04:39:38 -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=drjE9jpU; 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 S232644AbjC1L1p (ORCPT + 99 others); Tue, 28 Mar 2023 07:27:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232709AbjC1L1b (ORCPT ); Tue, 28 Mar 2023 07:27:31 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BC4C6E95 for ; Tue, 28 Mar 2023 04:27:29 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230328112722euoutp028580242418e0dfe8e047d83b6004cde1~Qka8_Uya72992529925euoutp02k for ; Tue, 28 Mar 2023 11:27:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230328112722euoutp028580242418e0dfe8e047d83b6004cde1~Qka8_Uya72992529925euoutp02k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1680002842; bh=Qd/EHq/hNi9U0eDQzSkYHva3vzVuhQ3/uVr2IhrtsQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=drjE9jpUzOwvKJrVY1iPOEPDBI27vBqwRWG6il8vuZYyNEyvF6xBLiF4Bd4xSnZkc khY2nUF+KDemqhNUQEnNdRD902LjMfSzeHSnDrTvdNr8Q8xVYscrY9hnWflP+iFEkz Afy6ntAMmTCyit7LuLu7bVEafMfaYQvM4EaRrdX4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230328112721eucas1p29c3e5a9281c3f21042a2ffafdd0866eb~Qka7TOoBk2371323713eucas1p2a; Tue, 28 Mar 2023 11:27:21 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 38.51.09503.81FC2246; Tue, 28 Mar 2023 12:27:20 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230328112720eucas1p2bbb42b49da00b4f2299049bf6bafce48~Qka65Z-hg0535105351eucas1p2X; Tue, 28 Mar 2023 11:27:20 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230328112720eusmtrp2ce3dc34f33115a65d99589fcad9b4c0a~Qka63UKs50134701347eusmtrp2U; Tue, 28 Mar 2023 11:27:20 +0000 (GMT) X-AuditID: cbfec7f2-e8fff7000000251f-80-6422cf18967a Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A0.81.09583.81FC2246; Tue, 28 Mar 2023 12:27:20 +0100 (BST) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230328112720eusmtip2188f4b42b34ffb070ff5ffc1e476b9e4~Qka6sYigr0132101321eusmtip28; Tue, 28 Mar 2023 11:27:20 +0000 (GMT) From: Pankaj Raghav To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org, akpm@linux-foundation.org, hubcap@omnibond.com, willy@infradead.org, viro@zeniv.linux.org.uk, senozhatsky@chromium.org, brauner@kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, mcgrof@kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org, Pankaj Raghav Subject: [PATCH 5/5] filemap: remove page_endio() Date: Tue, 28 Mar 2023 13:27:16 +0200 Message-Id: <20230328112716.50120-6-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLKsWRmVeSWpSXmKPExsWy7djPc7oS55VSDN5ftLaYs34Nm8Xqu/1s Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4uT6/8wWNyY8ZbRY 9vU9u8XnpS3sFrs3LmKzOP/3OKvF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrgjuKySUnNySxLLdK3S+DKeNs9i7VgHl/F +vsfGBsYz3J3MXJySAiYSPzddpipi5GLQ0hgBaPEqZNXGUESQgJfGCUuX7CCSHxmlFi37gYj TMeOt//ZIRLLGSVWt79hhHBeMkqsfTOPuYuRg4NNQEuisROsSETgDKPE4uWNbCAOs8B9Rolv L88zgYwSFjCUWDH3CZjNIqAqsXzuOzYQm1fAUmLD9IssEOvkJfYfPAs2lFPASmLabyuIEkGJ kzOfgJUwA5U0b53NDDJfQmA1p8S8C49ZIXpdJG5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9i5GLQ0hgKaPEsekrGSESEhK3FzZB2cISf651sUEUPWeUWDGvC6iDg4NNQEuisROsWUTg BqPE2qe/WEEcZpCiu/tes4J0CwsYSqyY+4QJxGYRUJVYPvcdG4jNK2ApsWH6RRaIDfIS+w+e ZQYZyilgJTHttxVIWAio5OqZ94wQ5YISJ2c+AStnBipv3jqbeQKjwCwkqVlIUgsYmVYxiqSW Fuem5xYb6RUn5haX5qXrJefnbmIExuu2Yz+37GBc+eqj3iFGJg7GQ4wSHMxKIrybvRVThHhT EiurUovy44tKc1KLDzGaAp09kVlKNDkfmDDySuINzQxMDU3MLA1MLc2MlcR5PQs6EoUE0hNL UrNTUwtSi2D6mDg4pRqYNJN2fz/6QVTltN8ZF97WlRk3LhiW3Gc8ad27onHbTaaClaem7VN7 7lAqpSIsl116c96/MOvOhUt3ph+ds/2soKH+l3uvF9q9YpXl5FVp0lv5+zsPy6cX+ctZ7ghn PDLSjRL3Mpzx+F/biQX9fZb1fJOWicQKnVx2Zp7StQBd3Rm+Rco73+mGHr7OL2Mr87HVXNym 8saWVzU/Hk18ULqxwEm2SZ1nelPnFP2V/fynJmsYnefq/Zox61Ak85/w9MVuh0IL9/xKE534 5cDE8vAnqo+XBObzHa0+/fCj1INph7ZkXOlVZA5+Gn9ONL51BssFI/0Gsdvn4yXm2Ga0MQvP 2xTsycD/VbS//bH6rMJ0JZbijERDLeai4kQAvVarymADAAA= X-CMS-MailID: 20230328112720eucas1p2bbb42b49da00b4f2299049bf6bafce48 X-Msg-Generator: CA X-RootMTR: 20230328112720eucas1p2bbb42b49da00b4f2299049bf6bafce48 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230328112720eucas1p2bbb42b49da00b4f2299049bf6bafce48 References: <20230328112716.50120-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?1761611432655969364?= X-GMAIL-MSGID: =?utf-8?q?1761611432655969364?= page_endio() is not used anymore. Remove it. Signed-off-by: Pankaj Raghav --- include/linux/pagemap.h | 2 -- mm/filemap.c | 30 ------------------------------ 2 files changed, 32 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index fdcd595d2294..73ee6ead90dd 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -1076,8 +1076,6 @@ int filemap_migrate_folio(struct address_space *mapping, struct folio *dst, #else #define filemap_migrate_folio NULL #endif -void page_endio(struct page *page, bool is_write, int err); - void folio_end_private_2(struct folio *folio); void folio_wait_private_2(struct folio *folio); int folio_wait_private_2_killable(struct folio *folio); diff --git a/mm/filemap.c b/mm/filemap.c index 6f3a7e53fccf..a770a207825d 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1625,36 +1625,6 @@ void folio_end_writeback(struct folio *folio) } EXPORT_SYMBOL(folio_end_writeback); -/* - * After completing I/O on a page, call this routine to update the page - * flags appropriately - */ -void page_endio(struct page *page, bool is_write, int err) -{ - struct folio *folio = page_folio(page); - - if (!is_write) { - if (!err) { - folio_mark_uptodate(folio); - } else { - folio_clear_uptodate(folio); - folio_set_error(folio); - } - folio_unlock(folio); - } else { - if (err) { - struct address_space *mapping; - - folio_set_error(folio); - mapping = folio_mapping(folio); - if (mapping) - mapping_set_error(mapping, err); - } - folio_end_writeback(folio); - } -} -EXPORT_SYMBOL_GPL(page_endio); - /** * __folio_lock - Get a lock on the folio, assuming we need to sleep to get it. * @folio: The folio to lock