From patchwork Wed Mar 22 13:50:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 73438 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2356461wrt; Wed, 22 Mar 2023 07:01:09 -0700 (PDT) X-Google-Smtp-Source: AK7set9bOIrjiCmb9r6gsJMiQrEd52VquzYsGRLjmyD+3mDx85mxvBumrUlPSYL5Ws802N0gzisG X-Received: by 2002:a17:906:4953:b0:877:a9d2:e5e9 with SMTP id f19-20020a170906495300b00877a9d2e5e9mr7651526ejt.42.1679493669815; Wed, 22 Mar 2023 07:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679493669; cv=none; d=google.com; s=arc-20160816; b=mH5TAKOKElsWwId5HU+L7WISxsbrSRbJh8YxjAlJ//jlNyezEmVLofOWWkfODeezdp fZMsSsy4LmZijk8nU1/+wNRWFMCQpzdcEeu/naQD+GyzblUZSFAyU5Xs+yWe7WC1VMlC lc4VQmJORnoJODfqbbTVNtcg457Xcxd2t8k+Lqm/0BtdXDDnHEjMjAWSaPgYfimtb+Oy nlKu8IltEPAgud+jeZGG16FZn04/QuoLG23tQ/M6s/uTG7B1z+nOyrklZEkjrqPXaEFR neg9djGlk7NH8KjTeTi7/xUP/ikx3Df6+Lt8qTuPyzrxzMNKc3R/tzegqr4HOl69GzB/ cCPQ== 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=ayJOnQy0cJGhVp2X4oA4O9yHIEvSlM4NjOeswQrRlbM=; b=tvO1HFPjmY1f77ipm2AM26GIylRKJ3lwBdGNHETpMF6euSjhSe0C1f39FzcAYI3P2j mPt89IzZpBlj6FXIHLXPWkqkIe050FNjDOwjKFz6iNiXJ1ig1MK2jTI0g/IvnBg6wRmo BY89B2dNVN+3CBQW6ifwFnJl8R5FgbIxMQy3Ee3r9GWavs6BUl421/iCAu+Ls/rrm+DY RTUKbQAk4Q9y5SrairWcQA1HW2+0cbQBmFQQC/Z2eWGNeYq0gbeaXql3RLKic4l+N+sl JlBdxYcixkpxwtf67oV/NauPp0sBYGq7d2OmKjvEiw+u/xFkotzn7RGqKg3JEyH44SWn W1wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=jxLxuMv8; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p15-20020a17090635cf00b00924fa0f7693si16300453ejb.778.2023.03.22.07.00.41; Wed, 22 Mar 2023 07:01:09 -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=jxLxuMv8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230508AbjCVNuy (ORCPT + 99 others); Wed, 22 Mar 2023 09:50:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230327AbjCVNup (ORCPT ); Wed, 22 Mar 2023 09:50:45 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82059637E8 for ; Wed, 22 Mar 2023 06:50:22 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230322135017euoutp01c57b89cf51003fc388c8e574f4409e26~OwgBeZ22x2152821528euoutp01K for ; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230322135017euoutp01c57b89cf51003fc388c8e574f4409e26~OwgBeZ22x2152821528euoutp01K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1679493017; bh=ayJOnQy0cJGhVp2X4oA4O9yHIEvSlM4NjOeswQrRlbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jxLxuMv8Fbh+flqd2wfT4DFjYUWiYF+pAGZG9jq1MkD34NB7EFUWc69IwJhVM8BCY Cije3dHiyaTah0viBkegX6iXobpP9SoDCR/sAOgdWL3qRZkb2osNgxPr76u1Cm7yv5 upYfW+rPBqS1isBzkPhwoeVQo9mPdo3Cv7ETQCjA= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230322135016eucas1p25117e603c54a51fa479f59756c985bea~Owf-8x0Je2739227392eucas1p2l; Wed, 22 Mar 2023 13:50:16 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 7E.84.09503.8970B146; Wed, 22 Mar 2023 13:50:16 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230322135015eucas1p1bd186e83b322213cc852c4ad6eb47090~Owf-hW9Mr1936419364eucas1p1R; Wed, 22 Mar 2023 13:50:15 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230322135015eusmtrp27e8edde4a243950d6e8a8590cf408615~Owf-ghEWR0726007260eusmtrp2D; Wed, 22 Mar 2023 13:50:15 +0000 (GMT) X-AuditID: cbfec7f2-e8fff7000000251f-e0-641b0798d498 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 99.6E.09583.7970B146; Wed, 22 Mar 2023 13:50:15 +0000 (GMT) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230322135015eusmtip26a172e30dde79a8b20bac498b7926a53~Owf-T0JHc1265312653eusmtip2f; Wed, 22 Mar 2023 13:50:15 +0000 (GMT) From: Pankaj Raghav To: senozhatsky@chromium.org, viro@zeniv.linux.org.uk, axboe@kernel.dk, willy@infradead.org, brauner@kernel.org, akpm@linux-foundation.org, minchan@kernel.org, hubcap@omnibond.com, martin@omnibond.com Cc: mcgrof@kernel.org, devel@lists.orangefs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, Pankaj Raghav Subject: [RFC v2 1/5] zram: remove zram_page_end_io function Date: Wed, 22 Mar 2023 14:50:09 +0100 Message-Id: <20230322135013.197076-2-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230322135013.197076-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBKsWRmVeSWpSXmKPExsWy7djPc7oz2KVTDCZt57GYs34Nm8Xqu/1s Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4uT6/8wWNyY8ZbRY 9vU9u8XnpS3sFrs3LmKzOP/3OKvF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrgjuKySUnNySxLLdK3S+DKOLrzD2vBFq6K P5cMGxjPcHQxcnBICJhITD4u3MXIxSEksIJR4tq9X0wQzhdG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nP97nNXi9485bA6CHrMbLrJ4bF6h5XH5bKnHplWdbB6bPk1i9zgx 4zeLR8PUW2wev27fYfXo27KK0ePzJjmPTU/eMgVwR+nZFOWXlqQqZOQXl9gqRRtaGOkZWlro GZlY6hkam8daGZkq6dvZpKTmZJalFunbJehlHN35h7VgC1fFn0uGDYxnOLoYOTkkBEwk/k5a yNzFyMUhJLCUUeLhtU2MEAkJidsLm6BsYYk/17rYIIqeM0o8W3WGtYuRg4NNQEuisZMdpEZE 4AajRPsqPZAaZpCay09nM4MkhAVsJHY9mwhWxCKgKrG1/SkLiM0rYCXx8G8XO8QCeYn9B8+C 1XMKWEs8WjSNDcQWAqq5vH8SK0S9oMTJmU/AepmB6pu3zmaewCgwC0lqFpLUAkamVYwiqaXF uem5xUZ6xYm5xaV56XrJ+bmbGIHRuu3Yzy07GFe++qh3iJGJg/EQowQHs5IIrxuzRIoQb0pi ZVVqUX58UWlOavEhRlOguycyS4km5wPTRV5JvKGZgamhiZmlgamlmbGSOK9nQUeikEB6Yklq dmpqQWoRTB8TB6dUAxPbn39uX3UDP0/cNsl0f2OOVGjumYzJU78I87p8dtJd/ufstAPqPTP6 WWU948/0THqW+1TZeMeFJW8t7wdELhS+wFOo2m+64ax2lC/HZ+EA9uBpT/bUrfrtaH3rRswP h63i7zZqG2S1il3Zddwtz+XZ9+mH98Y5/Jhx/ZXBlLqorbVxUwtMHoXd1P4VZBsRI3v0pxXL 4xTW+K5F53gCs+Y0BH/4vWDvGRnGukuP+A/s4lplmSEt7S+kEjG1Lfa8+Y2T6SyzOMSEF65d uOBbi+eBmqq5rT5GefqHZ80K79i469bZ+0r/uS/4nr9z4JbH7xSB6z+Tf1lMqr2z38zsK6Pc 81/r9khvuio35/rLAt1LSizFGYmGWsxFxYkAUAi+E18DAAA= X-CMS-MailID: 20230322135015eucas1p1bd186e83b322213cc852c4ad6eb47090 X-Msg-Generator: CA X-RootMTR: 20230322135015eucas1p1bd186e83b322213cc852c4ad6eb47090 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230322135015eucas1p1bd186e83b322213cc852c4ad6eb47090 References: <20230322135013.197076-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, 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?1761076754304769217?= X-GMAIL-MSGID: =?utf-8?q?1761076754304769217?= 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 zram_page_end_io function that unlocks or marks writeback end on the page. Signed-off-by: Pankaj Raghav --- drivers/block/zram/zram_drv.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index b7bb52f8dfbd..2341f4009b0f 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -606,15 +606,6 @@ 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) -{ - 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); -} - /* * Returns 1 if the submission is successful. */ @@ -634,9 +625,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec, return -EIO; } - if (!parent) - bio->bi_end_io = zram_page_end_io; - else + if (parent) bio_chain(bio, parent); submit_bio(bio); From patchwork Wed Mar 22 13:50:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 73431 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2353177wrt; Wed, 22 Mar 2023 06:54:26 -0700 (PDT) X-Google-Smtp-Source: AK7set/BMG55b84qm97uX2yfv6/i0aVaoJgNgdbnGSet0bVHhNc85r53wEcr/Gd+Cf4kI2e7g9Jo X-Received: by 2002:a17:902:f14d:b0:19e:25b4:7740 with SMTP id d13-20020a170902f14d00b0019e25b47740mr2152960plb.28.1679493266219; Wed, 22 Mar 2023 06:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679493266; cv=none; d=google.com; s=arc-20160816; b=o1HH7hlIRlDlRwfBB9Ubu4pqIP0wxdoH4oFtZEE0NTYCQVSKeG3jhqxQhVZ9Z2uHwd 0BR6owjNi8BubG0soYva2BFNY0wAyUxnU5xsfFl8qQys3VmM2/cfdWjm3uiP0T7aQ0iw GqAOsr+O8opdacNXxi3Hp4RaYJTc53Osh3TuF6ZPHCLYOBmk9HQ9X9XrbC7AkU7C/KXY VWuoFQutBfs8hk0XQLjf5WRthCpSZGOlP3VORwoeV+oypAVEAy6zvC2hJRCJdXwkmKFa 2UiybthkE4JMeowKTjHwwszkwELb4ol/YMO2/r3kASTj9jMJVAdiaNvif7V7IG6TwwCW TU9g== 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=B7mV7FXyoTd1l8VtYDL/Y6/ww7FK/3anjYTB9ana5Ew=; b=vvfVcrgtJkra6fqxuiOtCviFBSxOND2nskKUcCpmULR1K07Ok74vyPWj8TI7dEbV/G vXKxpDViUVM+JnsxXHNh7+nu7uboI/d0FD+Za7bfqPOxuEIKh5E9bdpoOr7nOf8/GqJj cZJpEd/g5dcrOmJB4qSOWCSNe9231E5TWVxqUbx2jZ9lIWgML/71rYU6A3x9vuHrGUWK d3XnXRX9Y7nyuo7bkkPrfW17S9s4sGVpaXKT8damYhyFsd8UBAb/5i8ZJXdhxf+6oaTa aknzI+wD1PS43UgvYpQAWy83g9B4vg/GX1TBl34yn7cdGtOAv9kHPqb5cCwcDZXhcNPv LMqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=B3kZYXG7; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020a170902d48300b0019e2bd0fea8si14106247plg.143.2023.03.22.06.54.14; Wed, 22 Mar 2023 06:54:26 -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=B3kZYXG7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229732AbjCVNvB (ORCPT + 99 others); Wed, 22 Mar 2023 09:51:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbjCVNuq (ORCPT ); Wed, 22 Mar 2023 09:50:46 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80ED7637DE for ; Wed, 22 Mar 2023 06:50:22 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230322135018euoutp018c905787c2e76844afacfebbe67c2508~OwgCPoYlg2152621526euoutp01J for ; Wed, 22 Mar 2023 13:50:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230322135018euoutp018c905787c2e76844afacfebbe67c2508~OwgCPoYlg2152621526euoutp01J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1679493018; bh=B7mV7FXyoTd1l8VtYDL/Y6/ww7FK/3anjYTB9ana5Ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B3kZYXG7gxRoA/syaoUAWSE3836oL/3vMQg6n4Pog4cc/CWBbpD883LaemojNNVtc HmB4uByLwCiVHTVmDNnRliYXqdTAhhy9SSZqwHHar9pHcz+/9/8GsXkR9fZImR9tr2 tOXl7dYx20ooyXimmvn5pEuCWtK4gC8pPRWcawkc= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230322135016eucas1p249e0287ce2648121944ff9859e7ca930~OwgAmbtE_0614806148eucas1p2s; Wed, 22 Mar 2023 13:50:16 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id CF.84.09503.8970B146; Wed, 22 Mar 2023 13:50:16 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230322135016eucas1p2ee1b64175f621ee425f7f48cb908dc20~OwgAQ7_-H2731127311eucas1p2h; Wed, 22 Mar 2023 13:50:16 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230322135016eusmtrp2b58b16b46a6e5ebd71064b4e97c60834~OwgAQS0ON0726007260eusmtrp2H; Wed, 22 Mar 2023 13:50:16 +0000 (GMT) X-AuditID: cbfec7f2-e8fff7000000251f-e2-641b07981cc7 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 0D.52.08862.8970B146; Wed, 22 Mar 2023 13:50:16 +0000 (GMT) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230322135016eusmtip2fb1d581c86b27c823127c62671bcf838~OwgACUjVU2536025360eusmtip2t; Wed, 22 Mar 2023 13:50:16 +0000 (GMT) From: Pankaj Raghav To: senozhatsky@chromium.org, viro@zeniv.linux.org.uk, axboe@kernel.dk, willy@infradead.org, brauner@kernel.org, akpm@linux-foundation.org, minchan@kernel.org, hubcap@omnibond.com, martin@omnibond.com Cc: mcgrof@kernel.org, devel@lists.orangefs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, Pankaj Raghav Subject: [RFC v2 2/5] orangefs: use folios in orangefs_readahead Date: Wed, 22 Mar 2023 14:50:10 +0100 Message-Id: <20230322135013.197076-3-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230322135013.197076-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01SfUwTZxjfe3e9HnUlxynpgyXqGl0iIgy3jINNxzKml21uc9k/28iwsTc+ bIG01M8sqQVhMlddA44B4uKAIX40FEHrIAjM1aZFsoEWKehGyjJ1xNljG59l3K5m/ve8v+f3 9SQvhTMB2Uoqr6CYNxZo9RpSQXT8OHNjY7VcrXvOLrzI1jnOkezZsWMk+6AvhNjutkqMvX3V hbHlYzaM7RrZwHZ2eQh28Eodyd45tyhjPY5FnB0+PoHYpr8eylmhsVTOft96mmQHFtwydm66 jsyI4WotPxFcW3MCN9hv5pwtR0jOGbLLuevVcwRnqRohudnAqI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vF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrgjtKzKcovLUlVyMgvLrFVija0MNIztLTQ MzKx1DM0No+1MjJV0rezSUnNySxLLdK3S9DL+NNwmr3gH0fF0zM/mBsYV7J3MXJySAiYSKy8 9pm1i5GLQ0hgKaNE29d7bBAJCYnbC5sYIWxhiT/Xutggip4zSuw/sxSom4ODTUBLorETbJCI wA1GifZVeiA1zCA1l5/OZgZJCAs4SPxfMokVpJ5FQFXi1nwZkDCvgJXEwevLWCDmy0vsP3gW rJxTwFri0aJpYDcIAdVc3g/SClIvKHFy5hOwemag+uats5knMArMQpKahSS1gJFpFaNIamlx bnpusaFecWJucWleul5yfu4mRmC0bjv2c/MOxnmvPuodYmTiYDzEKMHBrCTC68YskSLEm5JY WZValB9fVJqTWnyI0RTo7InMUqLJ+cB0kVcSb2hmYGpoYmZpYGppZqwkzutZ0JEoJJCeWJKa nZpakFoE08fEwSnVwKQYde9M9jO1DWsZWzs/Ws3uWfpi1/0DW0LWaG5ruswxtWSi3GTXw3lP jIwFmpd8Lm9Z3CSzf8Et5Yp3fpuWdsaUtL/g07z/fe/yMHnhWq2/4ofK1eu+bv6dwx9f3Xri s/zN5slG7ZeW3/vOyqPzoudbS4LrZY9efb4Yt8i/64ykZ/p32EXJd5c+tfl/Y8oB/y6ulqWn n9fnWUZ+Krios3bDxW8lVUvdHWr3ns6+GBf9ufaA7cMZZRrWW+b+qGV8/me+5S6lb2J9xhqR f46Eny0488F+ZuP6ILmyzHnrdKwKrc3drCPW8yzp2ZAuobnfTvKxa1rOY68zFsvWvF+1kuvv on8f5+98uGRvs6bYZ1YlluKMREMt5qLiRAAQHpt+XwMAAA== X-CMS-MailID: 20230322135016eucas1p2ee1b64175f621ee425f7f48cb908dc20 X-Msg-Generator: CA X-RootMTR: 20230322135016eucas1p2ee1b64175f621ee425f7f48cb908dc20 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230322135016eucas1p2ee1b64175f621ee425f7f48cb908dc20 References: <20230322135013.197076-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, 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?1761076331143120631?= X-GMAIL-MSGID: =?utf-8?q?1761076331143120631?= 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. Signed-off-by: Pankaj Raghav --- 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 Wed Mar 22 13:50:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 73435 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2354188wrt; Wed, 22 Mar 2023 06:56:49 -0700 (PDT) X-Google-Smtp-Source: AK7set9xK8qDkMhAQkU5PwKzmKazDk5ZlEe0wKPp3jJkS0pvSuibyCtE6ABFC6pFop24XmzxceRU X-Received: by 2002:a17:903:32c7:b0:19f:a694:6d3c with SMTP id i7-20020a17090332c700b0019fa6946d3cmr3364826plr.55.1679493409604; Wed, 22 Mar 2023 06:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679493409; cv=none; d=google.com; s=arc-20160816; b=qe9c8Vqs30bkGapElQPKxORvFaxou7D8XkaJPJwDIrD3i/5RFi/tfBGq7LkdFe4rwv ANR9zOPNV0jDoco6KCSWe4vwxw3bWPPFYgfmnG5x1h7oU2zUZu9iR6e32WUul3eqWHde +y3lGIN7yRABfuOrF/PqHdotAO7KcaRfjGoNZsK3lI3O4fPPGczMZliQilKfClMz1nup lolDgQwBx4mKdttlwyhLk3EVHSocS/ftoJySNYbxtKGQYXeHpGkH6s4C9k9qGeflqu9B jAuy+gd5FycipOamvnMhAm7IwqiJftEBOB7DcYhOBoM98KUlkY0JYdNd1vPoqMbY//7b 4hvg== 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=PKQc3JrLdtiPoLR3EtAIYmOiW0jzaLrjsLO/dP31aPsUbk+pfBfkY6qS/3JteU9ZiI e9XKdqntjllDWXUjMui2W0Wu42gEzze+9ty6bXV7I0lN6WaEblS6d0HTRV2tC/dSAjnT H2q3FucgkRN7FAN4aMAUYe4ekRGWnXjLrJuElT3WrMwEKjPz0pPDEuCp0Mcxed+m+nv4 sig3WQ6U+7+W17sBUbzbODxlTTmqh8Nj94XJuSppgwg2zVXQ6u2pplOUKrfpTlMJuCKu Zatd0d6miNDVHgEeLvUfTsBHrC9L0tMa9dzFMz8QbUloZQT/nLLUz4DK4auJU6QaNdnI mrQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NsCW33O+; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f4-20020a17090274c400b0019ec2a633f4si15413084plt.505.2023.03.22.06.56.12; Wed, 22 Mar 2023 06:56:49 -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=NsCW33O+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231180AbjCVNvF (ORCPT + 99 others); Wed, 22 Mar 2023 09:51:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230457AbjCVNuq (ORCPT ); Wed, 22 Mar 2023 09:50:46 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80FC0637E0 for ; Wed, 22 Mar 2023 06:50:22 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230322135019euoutp0207303e35fb57faf35a82f3dce0783d7d~OwgDPcMZ71713617136euoutp02S for ; Wed, 22 Mar 2023 13:50:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230322135019euoutp0207303e35fb57faf35a82f3dce0783d7d~OwgDPcMZ71713617136euoutp02S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1679493019; bh=5/+0KaEbpjyZkaLqtYLBQz1+pPqkvr1OOiQOg6+VTQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NsCW33O+y//g7yZSiWUmZFyW1iX5GhKRBk/wos093lNoKU7oN+ONmCmnW6Yfy3C2X w4SFKZ0FUJuYgM2ehVYaW1z8F/NEdAnEOIalrhVrkD8U6hCCLUL7Fayj14BIqgLNZv rHkzlVEMDZRKXe5G0KSZmc0i7oBQOasfkP8+SNDA= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230322135017eucas1p2629dcfb1875f78654e25001786cb234f~OwgBPtNpR2731127311eucas1p2j; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 91.38.10014.9970B146; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230322135017eucas1p1350c6e130fa367263432fa35894bdf1e~OwgAwlFQT1542115421eucas1p1C; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230322135017eusmtrp271a5c4fe6e5c76bbc457c0ee9d299624~OwgAvzLhg0726007260eusmtrp2I; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) X-AuditID: cbfec7f5-ba1ff7000000271e-14-641b079936f1 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 9B.6E.09583.9970B146; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230322135016eusmtip2064511fdb3f41a6d5ea559782138fbae~OwgAjsse92536025360eusmtip2u; Wed, 22 Mar 2023 13:50:16 +0000 (GMT) From: Pankaj Raghav To: senozhatsky@chromium.org, viro@zeniv.linux.org.uk, axboe@kernel.dk, willy@infradead.org, brauner@kernel.org, akpm@linux-foundation.org, minchan@kernel.org, hubcap@omnibond.com, martin@omnibond.com Cc: mcgrof@kernel.org, devel@lists.orangefs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, Pankaj Raghav , Christoph Hellwig Subject: [RFC v2 3/5] mpage: split bi_end_io callback for reads and writes Date: Wed, 22 Mar 2023 14:50:11 +0100 Message-Id: <20230322135013.197076-4-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230322135013.197076-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGKsWRmVeSWpSXmKPExsWy7djPc7oz2aVTDBquKFrMWb+GzWL13X42 i9eHPzFa7N88hcni5oGdTBYrVx9lsmi/28dksfeWtsWevSdZLC7vmsNmcW/Nf1aLk+v/M1vc mPCU0WLZ1/fsFp+XtrBb7N64iM3i/N/jrBa/f8xhcxDymN1wkcVj8wotj8tnSz02repk89j0 aRK7x4kZv1k8GqbeYvPYfbOBzePX7TusHn1bVjF6fN4k57HpyVumAJ4oLpuU1JzMstQifbsE roxVG/wL/vFU/F3n28B4jKuLkZNDQsBE4uqnRrYuRi4OIYEVjBJPXj9jgXC+MEp8OPuFHcL5 zCixrPEVG0zL6z2ToVqWM0rcPfIMynnJKPH17HzGLkYODjYBLYnGTrBuEYEzjB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xMzfrN4NEy9xeax+2YDm8ev23dYPfq2rGL0+LxJzmPTk7dMATxRejZF+aUlqQoZ+cUl tkrRhhZGeoaWFnpGJpZ6hsbmsVZGpkr6djYpqTmZZalF+nYJehmrNvgX/OOp+LvOt4HxGFcX IyeHhICJxOs9k9m6GLk4hASWMkp09B1mhkhISNxe2MQIYQtL/LnWBVX0nFFiy6lf7F2MHBxs AloSjZ3sIDUiAjcYJdpX6YHUMAt0Mkmc+DITLCEs4CWxbPoHJhCbRUBV4ujjnWALeAWsJI48 nAi1TF5i/8GzYDangLXEo0XT2EBsIaCay/snsULUC0qcnPmEBcRmBqpv3jqbeQKjwCwkqVlI UgsYmVYxiqSWFuem5xYb6RUn5haX5qXrJefnbmIExu+2Yz+37GBc+eqj3iFGJg7GQ4wSHMxK IrxuzBIpQrwpiZVVqUX58UWlOanFhxhNge6eyCwlmpwPTCB5JfGGZgamhiZmlgamlmbGSuK8 ngUdiUIC6YklqdmpqQWpRTB9TBycUg1M7Yfd/v7W55q/vP501as9vL2nzL9smMe87eXj/TlH E092Ppn8mDPq3cIlj61CVaun8R0yENb9Unfmvv7ve8G8PGUSh4XOu9pELJA+63j3Zp9K3I1e R7vS+06njteVdj4I5zrz+8sHH++r8659C57/RbKsoax2q/QP7SfGL5aevZbAvY/v7PGj/y0X lVtW9rFmc+zx8p3W//jy/G8REn5r1YPu/t2nJWzod0Er5lNmxfT7LN5XpmUExq99sWpBaP+m bSePShycV7y+/vqvTXbX9s/S+Rf78/vjlydOmbC5swWbTJ1rOOuV1o1L6hWvvJfe1ZRofDz5 HPts6fjy//6se7W6788NeFTz2rimMt0nvlGJpTgj0VCLuag4EQD9lYbvaAMAAA== X-CMS-MailID: 20230322135017eucas1p1350c6e130fa367263432fa35894bdf1e X-Msg-Generator: CA X-RootMTR: 20230322135017eucas1p1350c6e130fa367263432fa35894bdf1e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230322135017eucas1p1350c6e130fa367263432fa35894bdf1e References: <20230322135013.197076-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, 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?1761076481219523309?= X-GMAIL-MSGID: =?utf-8?q?1761076481219523309?= 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 Wed Mar 22 13:50: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: 73436 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2354842wrt; Wed, 22 Mar 2023 06:58:16 -0700 (PDT) X-Google-Smtp-Source: AK7set94ff6HNHyuR6hVjNSJ2QIlEiR+zIfRX3K9zTHDYOBSiKW0Y1DHW2k8E3MiGm/Xp1NPGn4S X-Received: by 2002:a17:902:e5c6:b0:1a1:98a9:406f with SMTP id u6-20020a170902e5c600b001a198a9406fmr3362047plf.67.1679493496728; Wed, 22 Mar 2023 06:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679493496; cv=none; d=google.com; s=arc-20160816; b=sFEsqqECkkDXIQAo0stPY0TOFhzy6/1wywlgVQZHv9izQbJhMIB6KSyfYQzNBxWHu0 S5LidsqRw/t6O6huXorkJdnAqaaO+5mOKtAb/q/pVKY725rhFzEO2qxPHcV3gDOmRfVP ZcoGa+GoXrJba7n6/IO/mD4IWmhwDvnlXsa9PL9+q6xgPvQ65SwTwwL18+CVI9g9Bh4F adg9rC95xgM4GBbCB99KcWSQS/vTOkYEDzdfQf5Gf+MRFW/fYKTcIeSysXKGtca/PaFn QXzhBZuXNE+qFviXeynG2QFFp5qkFtN6ugU4ZjQF0bjQc7OiOIDZ19oFuFx7ibsrTUlk qKEw== 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=bEycODUs3a19v9Q2MRV2ibzIXf/1C8rKj/6UCd36MJY=; b=GaLZAhql7Ia7eyFTPKPo7ITGPh+8HrkCJX173dkdfUXXWREPdldhjchPSLK5HLYUep mJ47rXiLRlFZXyi1JVmIzbGQdswAOWDHUJPvcx4rPN2uUHlhWDyXwhBhINwWBilQoDXC cIICEN75drHKp3gWYvwuzbWmZx8C9BUXgMCwmQr7b0gOyIApIrE71/Cny2tjYIi2LFgV G7mSje9oJVziE+bytkK5L6JRgxkvKKCy0oPl0R0zPEDanPs8c1EsHeBSM5XzUByvRZ3I 8INnUzlGmwrbZFQm+mW4N7YcCO7m1Pb4LeLTEKXGEaE6N/8TJ1Yk3eRVi5h7slUfRv4O veeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OE3TuYV5; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020a17090311cc00b0019cec510d4csi18092105plh.444.2023.03.22.06.58.01; Wed, 22 Mar 2023 06:58:16 -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=OE3TuYV5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231225AbjCVNvY (ORCPT + 99 others); Wed, 22 Mar 2023 09:51:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230496AbjCVNvB (ORCPT ); Wed, 22 Mar 2023 09:51:01 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4D325AB53 for ; Wed, 22 Mar 2023 06:50:46 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230322135019euoutp0225192ff029a2e5c31eb864d996a26af4~OwgDWB2fH1888918889euoutp02R for ; Wed, 22 Mar 2023 13:50:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230322135019euoutp0225192ff029a2e5c31eb864d996a26af4~OwgDWB2fH1888918889euoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1679493019; bh=bEycODUs3a19v9Q2MRV2ibzIXf/1C8rKj/6UCd36MJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OE3TuYV5eG6ueLT9Sql/pOs/SAiAfvuG9xGrrLCYnBTCQN1Jetoz8yGgrvjYrBXx2 rIOzqRA7jVp/mT/D6jN4n61A1V2fCkQ6ezxS41zL3/s8KjHZacM9S9muGz0fZyaEke 4+J7lecYRdBLfp6Nwl6izQyYpgRHc8PJUy8MH08M= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230322135018eucas1p12b4ac5ea50ea365ccac025b8b1a287ac~OwgBtgsgg3054630546eucas1p1f; Wed, 22 Mar 2023 13:50:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id C2.38.10014.A970B146; Wed, 22 Mar 2023 13:50:18 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230322135017eucas1p2d29ffaf8dbbd79761ba56e8198d9c933~OwgBSi9ph0617106171eucas1p26; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230322135017eusmtrp2fde4c0580c077ed043cd9b7695a7b4e2~OwgBR1bDu0670606706eusmtrp2b; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) X-AuditID: cbfec7f5-ba1ff7000000271e-16-641b079a66c5 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 0D.6E.09583.9970B146; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230322135017eusmtip28d89f9c0a2f04dd9e9c07a1b728a61a7~OwgBFYop52536025360eusmtip2v; Wed, 22 Mar 2023 13:50:17 +0000 (GMT) From: Pankaj Raghav To: senozhatsky@chromium.org, viro@zeniv.linux.org.uk, axboe@kernel.dk, willy@infradead.org, brauner@kernel.org, akpm@linux-foundation.org, minchan@kernel.org, hubcap@omnibond.com, martin@omnibond.com Cc: mcgrof@kernel.org, devel@lists.orangefs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, Pankaj Raghav Subject: [RFC v2 4/5] mpage: use folios in bio end_io handler Date: Wed, 22 Mar 2023 14:50:12 +0100 Message-Id: <20230322135013.197076-5-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230322135013.197076-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDKsWRmVeSWpSXmKPExsWy7djPc7qz2KVTDK48YbWYs34Nm8Xqu/1s Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4uT6/8wWNyY8ZbRY 9vU9u8XnpS3sFrs3LmKzOP/3OKvF7x9z2BwEPWY3XGTx2L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bKOXwMAAA== X-CMS-MailID: 20230322135017eucas1p2d29ffaf8dbbd79761ba56e8198d9c933 X-Msg-Generator: CA X-RootMTR: 20230322135017eucas1p2d29ffaf8dbbd79761ba56e8198d9c933 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230322135017eucas1p2d29ffaf8dbbd79761ba56e8198d9c933 References: <20230322135013.197076-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, 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?1761076572932129854?= X-GMAIL-MSGID: =?utf-8?q?1761076572932129854?= 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 | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/fs/mpage.c b/fs/mpage.c index 3a545bf0f184..103505551896 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) { + struct folio *folio = fi.folio; + + if (!err) + folio_mark_uptodate(folio); + folio_unlock(folio); } bio_put(bio); @@ -59,13 +61,21 @@ 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) { + struct folio *folio = fi.folio; + + 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); } bio_put(bio); From patchwork Wed Mar 22 13:50: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: 73443 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2363954wrt; Wed, 22 Mar 2023 07:12:43 -0700 (PDT) X-Google-Smtp-Source: AK7set/waWpdGHGUjnkKXVfEJkhHCKh05NdgsS0zGf4ioJ8tewgPuC3s6FnELTPsFER/kUyK1twu X-Received: by 2002:a17:903:2285:b0:19f:3854:3281 with SMTP id b5-20020a170903228500b0019f38543281mr3519078plh.8.1679494363685; Wed, 22 Mar 2023 07:12:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679494363; cv=none; d=google.com; s=arc-20160816; b=i+PnGUzpgdDxQnxU6TXmmtrsyk7xv3krlJs+u8vKvt+vGyaQcl9lXdJRC0lsqxJv3n AwjsC9UH5ND+BTx7JqTBUlrV/JhCFoVAkw3OmqaW0s8lB/HwTzeVLnRW+6l2RKomqUkC 0q5FaUeHSbSw3l6buPpBqDeoAqn8IdCDCvEL1sW1/jByo8etpY5zKphxC6cvP6l5Vxng e2g6I2cIU6worizxWlYYwt9fKEhk82rTnc+TY4Mjj0jwl41SojpcD/4dAbFqL20Fk2IO MJUENRbhVNryaUYvKPrP2grXvXWkH4yoGJFngO6wfQrrZC+jL1zqo6UhD6aSP5uNackn JPVw== 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=m7N8AsA/9dGGRU6vErsgBO0VI5TzmcryEvyMgNaPWOfrR4gqW7foX1B/Msi7/Bje3C s9zt2noH+TDhaN7vtOCKAF3J/ttoFVt0wFtlpkKTwLUCqES33/cAuGs5azFr1pmljdIz eaNqhYTbpYcFgBqGVzmelUFtO50N+QaxxKah8tKfixPFgYhyxa0vT34vuXVnF//oh/l3 f241mrAUXEx8GVKCwc9PAG4SFz5BwyrT8n551j70D2915S7Ow01YvY785j3vWhhtiE0+ rEQdoJ2UiaxppmIywip8ibWhfpfI3up2gWYfVRI1kEArZXc5Zwd6Q609Jh1CSURVXK1V bPfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="hJmJT4/T"; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z17-20020a170903409100b0019ce0ea2b56si14888826plc.39.2023.03.22.07.12.30; Wed, 22 Mar 2023 07:12:43 -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="hJmJT4/T"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230301AbjCVNv0 (ORCPT + 99 others); Wed, 22 Mar 2023 09:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231157AbjCVNvC (ORCPT ); Wed, 22 Mar 2023 09:51:02 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C50825ADC4 for ; Wed, 22 Mar 2023 06:50:46 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230322135020euoutp02aa45ae16d33321d81a08f3a4f24dd7a3~OwgEH9NTx1714217142euoutp02H for ; Wed, 22 Mar 2023 13:50:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230322135020euoutp02aa45ae16d33321d81a08f3a4f24dd7a3~OwgEH9NTx1714217142euoutp02H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1679493020; bh=Qd/EHq/hNi9U0eDQzSkYHva3vzVuhQ3/uVr2IhrtsQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hJmJT4/TDHDQkIqtbVSMoahNTDwVKD1u4vrCHnRXcUm63vWUcZ+RGNJzDFvbLlc0V 6z5abCG9rWAFXS9+BMc1UvhiwMd1V3GY5dCE99DNVCd2MHxpcFaDDuC/Y+xsZsdjBC LOTBVHFCv32cWVZ6WYvSmWiesLszDxGcA9ywsTbI= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230322135018eucas1p25c3a3715ad75a1e888ca3a12b22cd7e0~OwgCe8JE70616106161eucas1p2d; Wed, 22 Mar 2023 13:50:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 51.94.09503.A970B146; Wed, 22 Mar 2023 13:50:18 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230322135018eucas1p2dd82762cf7d2c0c5b5482a1d150ba369~OwgCAskCN0614706147eucas1p21; Wed, 22 Mar 2023 13:50:18 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230322135018eusmtrp258a3a526308b718ec79346250679f051~OwgB--C8t0726007260eusmtrp2M; Wed, 22 Mar 2023 13:50:18 +0000 (GMT) X-AuditID: cbfec7f2-ea5ff7000000251f-e7-641b079ac88c Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 5E.6E.09583.A970B146; Wed, 22 Mar 2023 13:50:18 +0000 (GMT) Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230322135018eusmtip2b06034e3955f717af8c7e270000bacfb~OwgBwcMLu2805428054eusmtip2B; Wed, 22 Mar 2023 13:50:18 +0000 (GMT) From: Pankaj Raghav To: senozhatsky@chromium.org, viro@zeniv.linux.org.uk, axboe@kernel.dk, willy@infradead.org, brauner@kernel.org, akpm@linux-foundation.org, minchan@kernel.org, hubcap@omnibond.com, martin@omnibond.com Cc: mcgrof@kernel.org, devel@lists.orangefs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, Pankaj Raghav Subject: [RFC v2 5/5] filemap: remove page_endio() Date: Wed, 22 Mar 2023 14:50:13 +0100 Message-Id: <20230322135013.197076-6-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230322135013.197076-1-p.raghav@samsung.com> MIME-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i9/0s99eX1ontXpC/5Sv5/afvKp45snlrrgnt+7MS1ukVxNnsvZbjO7OPr6uT56L46bp Wc6UCtrKnBXne/zZjwdu8ZWM4rU65s/m3NVlvv2m8qSVTjb/0otFflXvH9hZ1YRGH9sYe613 yVmHW3OmvLF93rND7clW+/rl5yVjPq/bfdYk7wDP0kIx8xn9YlnelwojX+9LsghMaJZo+G51 u6KUzfdsfiaH2EErXptyJZbijERDLeai4kQAusTwxl8DAAA= X-CMS-MailID: 20230322135018eucas1p2dd82762cf7d2c0c5b5482a1d150ba369 X-Msg-Generator: CA X-RootMTR: 20230322135018eucas1p2dd82762cf7d2c0c5b5482a1d150ba369 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230322135018eucas1p2dd82762cf7d2c0c5b5482a1d150ba369 References: <20230322135013.197076-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, 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?1761077482157101117?= X-GMAIL-MSGID: =?utf-8?q?1761077482157101117?= 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