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: 13184077
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17])
by smtp.lore.kernel.org (Postfix) with ESMTP id 631F2C74A5B
for ; Wed, 22 Mar 2023 13:50:24 +0000 (UTC)
Received: by kanga.kvack.org (Postfix)
id D7B856B0072; Wed, 22 Mar 2023 09:50:23 -0400 (EDT)
Received: by kanga.kvack.org (Postfix, from userid 40)
id D54DD6B0071; Wed, 22 Mar 2023 09:50:23 -0400 (EDT)
X-Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
id BCEFB6B0078; Wed, 22 Mar 2023 09:50:23 -0400 (EDT)
X-Delivered-To: linux-mm@kvack.org
Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com
[216.40.44.10])
by kanga.kvack.org (Postfix) with ESMTP id A8B336B0071
for ; Wed, 22 Mar 2023 09:50:23 -0400 (EDT)
Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1])
by unirelay05.hostedemail.com (Postfix) with ESMTP id 7A2944042C
for ; Wed, 22 Mar 2023 13:50:23 +0000 (UTC)
X-FDA: 80596668726.06.E9410C3
Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com
[210.118.77.12])
by imf23.hostedemail.com (Postfix) with ESMTP id EE12D14000E
for ; Wed, 22 Mar 2023 13:50:19 +0000 (UTC)
Authentication-Results: imf23.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b=jxLxuMv8;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror);
spf=pass (imf23.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.12 as permitted sender) smtp.mailfrom=p.raghav@samsung.com
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=hostedemail.com;
s=arc-20220608; t=1679493020;
h=from:from:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=ayJOnQy0cJGhVp2X4oA4O9yHIEvSlM4NjOeswQrRlbM=;
b=GOmKKuIVBQSaFBAHj1bRXVi1mIGGX3rSNdRNaI7a4QB+Heifu9/cEaD8ZrU6hQa5WQOZKM
/ry9X+2XcrYoU/ogtAmWjzUJt6ohYBRP5xzIgmx0B9Rv1ejhH/MEh/+k4ltOo2vwrrplES
Z7HslVuST1dwRAwoPkuX3vP5MExqPeU=
ARC-Authentication-Results: i=1;
imf23.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b=jxLxuMv8;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror);
spf=pass (imf23.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.12 as permitted sender) smtp.mailfrom=p.raghav@samsung.com
ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679493020; a=rsa-sha256;
cv=none;
b=X6N556s8Z2LqKVYveKYJaaHFSsEbQoPOy4820YOzCbQF/oN0JslAX++4Rgmev6DhjPgUJM
YD9fgmAxW/RapPyDDajZMs42nr3U6F9k5btrBvMCSxxCohWaO7riDAnOYj8wZvHIvlN1Vy
+9PTRo3SQXUeufDY3dvvrvyO3bx47cM=
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id
20230322135017euoutp02e7f5d3ee48026dc6b033a57433b021e4~OwgBbEanB1888918889euoutp02O
for ; Wed, 22 Mar 2023 13:50:17 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com
20230322135017euoutp02e7f5d3ee48026dc6b033a57433b021e4~OwgBbEanB1888918889euoutp02O
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
P5cMGxjPcHQxcnBICJhITD4u3MXIxSEksIJR4tq9X0wQzhdGic9HrjBCOJ8ZJY6+uMrSxcgJ
1vF30kJmiMRyRokZb59CVb1klFh3fjsryFw2AS2Jxk52kLiIwBlGiSlNMxhBupkF7jNKnN4L
NklYwEZi17OJ7CA2i4CqxNb2p2BxXgEriYd/u9ghtslL7D94lhnE5hSwlni0aBobRI2gxMmZ
T1ggZspLNG+dzQxR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DYxnOLoYOTkkBEwk/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-Rspam-User:
X-Rspamd-Server: rspam02
X-Rspamd-Queue-Id: EE12D14000E
X-Stat-Signature: nrjp1hn7x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TUBIwCoaC/VdpGwNyc8rGBF3E1/3lGWhzO8+7/hI7xRahfYtclMapJxqpLql91/2NU84EqK4LaJV5uS9awkAEXkriRmM1e7syMC5FgIWLrXN7Ax2eFtIzWpDHA0cK1i1mQ//x9YDP1h7/72XPCEKj+EmFM
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4
Sender: owner-linux-mm@kvack.org
Precedence: bulk
X-Loop: owner-majordomo@kvack.org
List-ID:
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: 13184079
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17])
by smtp.lore.kernel.org (Postfix) with ESMTP id AFDD6C6FD1F
for ; Wed, 22 Mar 2023 13:50:28 +0000 (UTC)
Received: by kanga.kvack.org (Postfix)
id D2F856B0078; Wed, 22 Mar 2023 09:50:24 -0400 (EDT)
Received: by kanga.kvack.org (Postfix, from userid 40)
id CDF406B007B; Wed, 22 Mar 2023 09:50:24 -0400 (EDT)
X-Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
id A47E66B007E; Wed, 22 Mar 2023 09:50:24 -0400 (EDT)
X-Delivered-To: linux-mm@kvack.org
Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com
[216.40.44.13])
by kanga.kvack.org (Postfix) with ESMTP id 847476B007B
for ; Wed, 22 Mar 2023 09:50:24 -0400 (EDT)
Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1])
by unirelay03.hostedemail.com (Postfix) with ESMTP id 40B55A04CC
for ; Wed, 22 Mar 2023 13:50:24 +0000 (UTC)
X-FDA: 80596668768.27.592E6C1
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by imf11.hostedemail.com (Postfix) with ESMTP id 17C6140018
for ; Wed, 22 Mar 2023 13:50:20 +0000 (UTC)
Authentication-Results: imf11.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b=B3kZYXG7;
spf=pass (imf11.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=hostedemail.com;
s=arc-20220608; t=1679493021;
h=from:from:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=B7mV7FXyoTd1l8VtYDL/Y6/ww7FK/3anjYTB9ana5Ew=;
b=vuQ4Z+B+WBO2yLC9MOQzYjQk7jOSPfLMB8L42PKD7SCoXoIwi7wxwUr9hEysS21gUrHig+
rnV4nwkOVUd3N8o8vK0DzVtgBnih5HBlQPo5NkfflhHrbbCpE3k3fBhk68+npw5PJIQLGE
8HTCAEhEBI29ik/UfEbyQ0mP+ePPfm8=
ARC-Authentication-Results: i=1;
imf11.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b=B3kZYXG7;
spf=pass (imf11.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror)
ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679493021; a=rsa-sha256;
cv=none;
b=Ys4ViIhnCr+yhlHEQZQkBhu2+HQt98ReNb770hXk4Xf+B/KVNrOiSFesuf4InmY73eboEF
MdaMAUUT2GBZGsKY5ZDhAxIq7beHpbyOHlthEKz4nuGaM+hiCMeEigcg6Kl6L5IqRxFAje
S/uT0MN9L/cdtZug9BNSe8KmInraZCA=
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230322135018euoutp0104e75f09058f4927c01b4cb7b56172e2~OwgCJ_2D22115121151euoutp01R
for ; Wed, 22 Mar 2023 13:50:18 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230322135018euoutp0104e75f09058f4927c01b4cb7b56172e2~OwgCJ_2D22115121151euoutp01R
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
jsyI4WotPxFcW3MCN9hv5pwtR0jOGbLLuevVcwRnqRohudnAqIyzXWxBnOBcxTmDk9i7yz5U
vKzj9Xl7eGPylp2K3HmLV14UpvZN+KZxCzojr0BRFNAvgO2SF6tACoqhmxEErNeR9JhC0C4c
JkQWQwsIbn+7/bHizC1BJuHfIShvXyMJ7iE4WnV1yYqiSDoBDh2Ri/gK2oeg0lqNRAFO30Xg
7frPdDmdAYsNdpnIJ+h1MHIqXoSVdDr0+JsIKWs1dPf04+IcRb8E46dPkBInBjxfBwnJcjWU
tNfiYhbQZ6PAHj6PJHEmBM57IkbL4b77YuTkeFh0ncKk+SBMDM9FxKUIjrkcpFgIltJsPr04
4vR6cFxJluivwu/NLiQxomF4MkaqEA32jq9wCVbCZ2WMxNaAayYYCQUYtNZFynAQulxCHEfP
1D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knMArMQpKahSS1gJFpFaNIamlx
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-Rspam-User:
X-Rspamd-Server: rspam04
X-Rspamd-Queue-Id: 17C6140018
X-Stat-Signature: gbdfy8a7fq4jftqk3tj648aqahg9b3zj
X-HE-Tag: 1679493020-856346
X-HE-Meta:
U2FsdGVkX1+Zt+9st/GNYSZx8t48eY6gVB12CtjJzCHTJ0C0jXsAwqjIlfNjwPwDFZow7v+lK1Ch+onYAbD+pnu7T/6u88qYhEozSP4m5b2cuxyG6J/euYrqx/TRPvSv/KKqt0w3ZBBf3nXysyR2jS4y0FVNU9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-linux-mm@kvack.org
Precedence: bulk
X-Loop: owner-majordomo@kvack.org
List-ID:
Convert orangefs_readahead() from using struct page to struct folio.
This conversion removes the call to page_endio() which is soon to be
removed, and simplifies the final page handling.
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: 13184080
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17])
by smtp.lore.kernel.org (Postfix) with ESMTP id 8D58AC74A5B
for ; Wed, 22 Mar 2023 13:50:30 +0000 (UTC)
Received: by kanga.kvack.org (Postfix)
id 8004D6B007B; Wed, 22 Mar 2023 09:50:25 -0400 (EDT)
Received: by kanga.kvack.org (Postfix, from userid 40)
id 712B86B007D; Wed, 22 Mar 2023 09:50:25 -0400 (EDT)
X-Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
id 565B96B007E; Wed, 22 Mar 2023 09:50:25 -0400 (EDT)
X-Delivered-To: linux-mm@kvack.org
Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com
[216.40.44.10])
by kanga.kvack.org (Postfix) with ESMTP id 3EC626B007B
for ; Wed, 22 Mar 2023 09:50:25 -0400 (EDT)
Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1])
by unirelay04.hostedemail.com (Postfix) with ESMTP id F25AE1A0484
for ; Wed, 22 Mar 2023 13:50:24 +0000 (UTC)
X-FDA: 80596668768.17.DA47C9C
Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com
[210.118.77.12])
by imf24.hostedemail.com (Postfix) with ESMTP id 6BF93180015
for ; Wed, 22 Mar 2023 13:50:21 +0000 (UTC)
Authentication-Results: imf24.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b=NsCW33O+;
spf=pass (imf24.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.12 as permitted sender) smtp.mailfrom=p.raghav@samsung.com;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=hostedemail.com;
s=arc-20220608; t=1679493021;
h=from:from:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=5/+0KaEbpjyZkaLqtYLBQz1+pPqkvr1OOiQOg6+VTQI=;
b=J2a3TaBJp7wdiZ+a6mN2CQmdTaz4WLaMW37G1LgMctCkyyAwIjbyCQVtO4MFBx+ZIQaHJB
Jz3VrZz1+jPSOO4mZmM9JBFrjXxJantizUs0ZgoUBiM8zxTw4Bop6u6/RvRAtcS1Sn3VrC
JR8Gn3YyQluK0/Rk1hrkLJ9MrCDfK/0=
ARC-Authentication-Results: i=1;
imf24.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b=NsCW33O+;
spf=pass (imf24.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.12 as permitted sender) smtp.mailfrom=p.raghav@samsung.com;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror)
ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679493021; a=rsa-sha256;
cv=none;
b=RBU91FDiBGTWiy+KtYVGfUBeymBmm7y15tQxnEEKjC2TQ4jsoT9cWFUNI/0m/0Dz/26f10
SnyAHWCwBJKlqEK3wbwmc6TEmAtGWn068MWKqKGtTTC2ZaNxmEQYq1R4nJs1SO8tUnlzoC
KaRPDsy2HolLQS7fTdPopgAOI1L+QWE=
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id
20230322135019euoutp029c212509bc53b81c997cd1cca3f5d862~OwgDIjnyO1787317873euoutp02x
for ; Wed, 22 Mar 2023 13:50:19 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com
20230322135019euoutp029c212509bc53b81c997cd1cca3f5d862~OwgDIjnyO1787317873euoutp02x
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
zCixrPEVG0zL6z2ToVqWM0rcPfIMynnJKPH17HzGLkYODjYBLYnGTrBuEYEzjBJTmmYwgjjM
Av8ZJXoPLwQbJSzgJbFs+gcmEJtFQFXi6OOdzCA2r4CVxJGHE5kh1slL7D94FszmFLCWeLRo
GhtEjaDEyZlPWEBsZqCa5q2zmUEWSAjs5pTYee0YM8gVEgIuEg0dxhBzhCVeHd/CDmHLSPzf
OZ8Jwq6WeHrjN1RvC6NE/871bBC91hJ9Z3JATGYBTYn1u/Qhyh0lnkxqhZrOJ3HjrSDEBXwS
k7ZNhwrzSnS0CUFUK0ns/PkEaqmExOWmOSwQtofE0Zet7BMYFWch+WUWkl9mIexdwMi8ilE8
tbQ4Nz212DgvtVyvODG3uDQvXS85P3cTIzApnv53/OsOxhWvPuodYmTiYDzEKMHBrCTC68Ys
kSLEm5JYWZValB9fVJqTWnyIUZqDRUmcV9v2ZLKQQHpiSWp2ampBahFMlomDU6qBacq06uq4
wmNxqi+OpEXbeJ8w2363geH/Amndq6Zf3+n53pqTfDbirozYO+5//eZX67+d2VuUqCo94YbK
skie5cVvy2b1sUwou/P/dckTLaNLXFyThCbUvsmd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q/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-Rspamd-Server: rspam07
X-Rspamd-Queue-Id: 6BF93180015
X-Rspam-User:
X-Stat-Signature: wscszuwi5sz9uyqfz8nb7uerdiwo7qg3
X-HE-Tag: 1679493021-462107
X-HE-Meta:
U2FsdGVkX1+MTNLRQa2kQwATv++yoCBq7DF4RwOz03whINbO1gHXM57ooCUmuL7svhGKngJJgKf8LCOoSsDYYidwZgomBD5+ICcSEm0xWgetC7QlwauC0BNd3ixG+2+upJr2QBbaQO1Cxmoub4YHQO/sfCea981P7V5I7q5h5B+rADtotp8QkOIz/jICT9W9fslA/LV2o7vONJpPc2SNFgFR7WWHzhdAzX2curl08LqHWQX/WogBgMGjp/HX0sabFFDjT0h9AzRZ2ZvEG0kKIeZhet3nIEic8DT3VHA+EeeCz0yCsRgzh0inYCHU7LDhCXBzi8QmmqHxGuUnRdB0Zf6KaAPf8kXLeSqDg+HEi8NnBfXvdVjq7wGDMBjyxp6Y07FmUpgykelUG/YV2esWckt135LTxWNUBBdTJ20ieEF/p8DXWpOWN5YVQAYj0mVA49IKxkKkBAwU3ETVJkZQldvlAOvr9c8z1d8Jha9kn6/PUXEVQkpaPFTf51mgWDYIchgLAjq9U9dlP+/Q29Z2b/0EBQUTVx6wYMrIGhECfZxVh8IewSw84mlnOuiGMYxuDsK3ML40S+CFrnCghDDjhWwl30BGI2C/C0wxJr0Xx6r2bDxprGXrvHida0zXaM+4LHGJKjac8dJyGHr3f+5H5ZaccMmR1vhOF3PaVmvZpqWuQrDoe/oqCxYhqjpb1ZErCc9DEs9ZEEuC6wfCzr6gBtQM3DUSeAdR+U5HvZt8m0yPckaDYyjQBFOsjkqVuQ+QvfAyLx8ojVOh0WsOOgRCApjqb5GBXJ21R2a+vgSgRbQnDsG6PZ5lNu41Mhg2lf64xGtUxtGgzF3HnZh4b193/YVa8rnJPN1Oles0xWmUIGssU8PP1HfciC3wpVJ1R3zBhY/YacaHIITgMHS8oRinziOi3u61w5vBmRMxwf8SVmMLkjAEaDtwWq3in077EzIE3xFRGe0KK0XUiSCxgcH
/6vqv3im
YX/tB2zgvHC1lpmUTjv4l5TC0H0Fy1okXGwI2wn9prewuLhYIvfMHH3uYYmlwcVuYyIJYl2q88ovBpk8ArWAHUfEaSkwF+EYIHOcCTlZXZMWR6dHbwTk84EMOsoNlmP5scNUAu092msQFS4380hzt6N2wyOa2FHi7byuKXw3krq8IxrFFjotD+KuNn3UW5LAxEubJ
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4
Sender: owner-linux-mm@kvack.org
Precedence: bulk
X-Loop: owner-majordomo@kvack.org
List-ID:
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: 13184078
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17])
by smtp.lore.kernel.org (Postfix) with ESMTP id E31FEC761A6
for ; Wed, 22 Mar 2023 13:50:26 +0000 (UTC)
Received: by kanga.kvack.org (Postfix)
id 826436B0075; Wed, 22 Mar 2023 09:50:24 -0400 (EDT)
Received: by kanga.kvack.org (Postfix, from userid 40)
id 7D6096B0078; Wed, 22 Mar 2023 09:50:24 -0400 (EDT)
X-Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
id 5DAAB6B007B; Wed, 22 Mar 2023 09:50:24 -0400 (EDT)
X-Delivered-To: linux-mm@kvack.org
Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com
[216.40.44.12])
by kanga.kvack.org (Postfix) with ESMTP id 507546B0075
for ; Wed, 22 Mar 2023 09:50:24 -0400 (EDT)
Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1])
by unirelay03.hostedemail.com (Postfix) with ESMTP id 2B91CA04C9
for ; Wed, 22 Mar 2023 13:50:24 +0000 (UTC)
X-FDA: 80596668768.29.20D6417
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by imf13.hostedemail.com (Postfix) with ESMTP id 5C0782001B
for ; Wed, 22 Mar 2023 13:50:21 +0000 (UTC)
Authentication-Results: imf13.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b=OE3TuYV5;
spf=pass (imf13.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=hostedemail.com;
s=arc-20220608; t=1679493021;
h=from:from:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=bEycODUs3a19v9Q2MRV2ibzIXf/1C8rKj/6UCd36MJY=;
b=huLNcCQUnrS6eeX+ytOyn2yU3fSReiamk5e9cXzXa2hVZL0oBYDlDB5N5UY+4sozI5inhS
Ba/aTpYuDESgHYIZG6ffvTV1pOx1sV1iMlyXJx4H+Al0akEopFIiGYrOVjfD64iP5PUYHu
9URiLKyCIxqhcWHuaHvba0U8P6OvGt4=
ARC-Authentication-Results: i=1;
imf13.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b=OE3TuYV5;
spf=pass (imf13.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror)
ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679493021; a=rsa-sha256;
cv=none;
b=lDYYWZaertbBqDQZacKtfmJo+FQEHkrV9POFgvrSXIv/1ArQ0TWrGZAd/Tqlz1HH3NOyUn
V/lAuO/CzRKNvolw+YyDmYe8ubHoI9WnqLgA3r94eNsfluIcxJSmNmsep4DEh7J8EAAMqo
LOZ73BvymgmOFu2Kc0ZVFgeH4T0bKm4=
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230322135019euoutp01cd3b6f5db0c96a9bd8c25f82d65892c3~OwgDSen7N1889118891euoutp01T
for ; Wed, 22 Mar 2023 13:50:19 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230322135019euoutp01cd3b6f5db0c96a9bd8c25f82d65892c3~OwgDSen7N1889118891euoutp01T
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/3OKvF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi
xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrgjuKySUnNySxLLdK3S+DK+Pn0NHtBC1/F
pcaTjA2M67i7GDk4JARMJG78Tu1i5OIQEljBKHFq10dWCOcLo0TntmlQzmdGiTltW1m6GDnB
Olq39LBDJJYzSkz+uJcJwnnJKLH20ScmkLlsAloSjZ1gRSICZxglpjTNYATpZha4zyhxei/Y
JGEBW4mFF3cygtSzCKhKrLyWDhLmFbCSmDxhMSPEMnmJ/QfPMoPYnALWEo8WTWODqBGUODnz
CQvESHmJ5q2zmUF2SQis5pTY3XufDaLZRWIGMDYgbGGJV8e3sEPYMhL/d85ngrCrJZ7e+A3V
3MIo0b9zPRskYKwl+s7kgJjMApoS63fpQ5Q7Shx5sgGqgk/ixltBiBP4JCZtm84MEeaV6GgT
gqhWktj58wnUUgmJy01zoEHoIXFk8RT2CYyKs5A8MwvJM7MQ9i5gZF7FKJ5aWpybnlpsnJda
rlecmFtcmpeul5yfu4kRmABP/zv+dQfjilcf9Q4xMnEwHmKU4GBWEuF1Y5ZIEeJNSaysSi3K
jy8qzUktPsQozcGiJM6rbXsyWUggPbEkNTs1tSC1CCbLxMEp1cBUOmvnyuO/+XtP28QvuPbg
/D0dMQ3f7qzXS+8YOIh07ZzFxGb40Kt69223OfPUVi23ZtlkEJOzS/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Lrs37+vZoLbew6/4sbxV/vy5lneOs7V5sgn2dWXO5rPVrJX9
cjLzfNOKzNceh8onWGaffW++69hu8Q2dJdNPLPCYtFj3v4pixLbJL9OenVzLe+ai5L+O4+dd
z/tMbv5owLgs3V5I2y2h/nvWrrOiSWYFHV+/X5Y+8saWd2WSZbH9TAtX66d8ai8D54R9vr43
59z+sv1rl3uWX3MPO//Ha+viY0veJd4y3queKvJnzcanLI+WSb5N/eWrWjZLomDDJL6LStxM
lj6vWH989PeI+pPjcFtMr/pYxfYPT6e+aD64W25HyoHfU74c6VZXFPqcGrjDcP2S6S8TXWea
i4dt93rYulo13EBq2RolluKMREMt5qLiRADBlbKOXwMAAA==
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-Rspamd-Server: rspam07
X-Rspamd-Queue-Id: 5C0782001B
X-Rspam-User:
X-Stat-Signature: x3etqikqyj5jxi4c8i4med59eq737i8e
X-HE-Tag: 1679493021-931647
X-HE-Meta:
U2FsdGVkX18mbEylKv7qVV8s1ZUhEKWTj4xjwl4caJ5G9WXRJaiEvLz860eO/JuJmKk6uHJJ9D6JJJ+6HCMYHp7vCPplta5n19OhUJDUxNzQ3Oh6zWmqObHn31zyazNwe+FE4cMPDGyexQuxpzzi0M0lBJ6NmvS2wEl996dKlCWR8dXK9znNYYV/vwJb/CqzO5R9iDoBtU2CYxaJhBwpCcEsfCWHMXTh2TjqzEEjU/9yRQ0hLNXZnNbJwj5Kb0SFv3xShibZjclmoB28RcyJ5gp/SdaabovSnV4Q0eiSsho8j4cW62VVFUF9TFuLiUAtJFjBMr2klywf46K7AkRw+7U2Hp48xJ8VHsew1pPqj05TLkF4IvUcHJGKlF0eLThwCLMwg14oDhpM85QFABedPiFE/AXcmN7o+AtZaSgl3SNmb8+2HypbzrMaKuY/efs2Rl9+92CzBRgmRrOOn/eC6yTNsPvliZMxGFXsdzDOF/H8ezOHxBpFUU2vUcgfCcTVAYuN1++YIH41vafe7DPJTldaHgtyvBqt2VD8VvFnj0rutnci4Q5FzHgI/mAwgN2kEHosDUGlE90ON0ixw6M7Uq9YTrujWBfgZ8AvmuBRBohzD5/VOlJ64suo8YSecqHXKRJhJZxzmrJGkqbSWNZ3TlR97PNPqKu0vwnucbGhsjtDjGbi9/Q8Qf0nROS9wdEE6dBD/yOGgp8DHXZnBrdgmMLmDoUC2JInjsn4N2RWOysqQngLjnBiMvuKBZXnKHVwrrJWhY3D61hrrJ1LKrw1RaQMMLY0gahrKc3LloDeA8t0FLp/miOu0Wl/C45it8+LTwHiYs2cyBbZHql3a0TrsaztMPQn0Oxhr7PJ9/5xE4zAljr7qqSOihWK8GygpvKrvjA/x8dK/af3RgnBpkt8o4rmweFX20Gftt9DHwt3uPhts8v045U1buAozhunAhrJLusE22K/DxZi+p5mSHG
rBMZZDIX
SkI7SDyhOjLaITtZbLZR1d5dcipRdNM3NLvWegzsc9jpjGzMJUUTeU8/5oBw6wSi17mZyn6ea22w0ilU7UqzbYld7MvEHDcshVBPcdwzmqoRdOepL/nXI8OGnYuayUfVpV+8Uj9/fHxDCPz8GQk8tEIJj6rPvlbvmyWiIiCppeZ/xO5mxIRx/QG+BFjvZAYhTpPBq
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4
Sender: owner-linux-mm@kvack.org
Precedence: bulk
X-Loop: owner-majordomo@kvack.org
List-ID:
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: 13184081
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17])
by smtp.lore.kernel.org (Postfix) with ESMTP id F11A3C6FD1F
for ; Wed, 22 Mar 2023 13:50:31 +0000 (UTC)
Received: by kanga.kvack.org (Postfix)
id D58046B007D; Wed, 22 Mar 2023 09:50:25 -0400 (EDT)
Received: by kanga.kvack.org (Postfix, from userid 40)
id D06936B0080; Wed, 22 Mar 2023 09:50:25 -0400 (EDT)
X-Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
id ABD696B007D; Wed, 22 Mar 2023 09:50:25 -0400 (EDT)
X-Delivered-To: linux-mm@kvack.org
Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com
[216.40.44.16])
by kanga.kvack.org (Postfix) with ESMTP id 8F2346B007E
for ; Wed, 22 Mar 2023 09:50:25 -0400 (EDT)
Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1])
by unirelay10.hostedemail.com (Postfix) with ESMTP id 6132FC04B8
for ; Wed, 22 Mar 2023 13:50:25 +0000 (UTC)
X-FDA: 80596668810.15.7957324
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by imf09.hostedemail.com (Postfix) with ESMTP id BB6D6140021
for ; Wed, 22 Mar 2023 13:50:22 +0000 (UTC)
Authentication-Results: imf09.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b="hJmJT4/T";
spf=pass (imf09.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=hostedemail.com;
s=arc-20220608; t=1679493023;
h=from:from:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=Qd/EHq/hNi9U0eDQzSkYHva3vzVuhQ3/uVr2IhrtsQQ=;
b=NXnjKn2cet8GTE/z2V/DuUTURZHHMNFNeBoLUHg+WSnCA5GP3GTskamaQ5dW8INhWN1Sa8
cJwXMjsyk4eRU6emnhX0Cn3P3ONneOCM4QLS4c/1pXroOUk3KgXwsnNtY24xOpv6pGBQ5i
0IoXYp/vGb9dGAJMw9T7ok6vygDPpA0=
ARC-Authentication-Results: i=1;
imf09.hostedemail.com;
dkim=pass header.d=samsung.com header.s=mail20170921 header.b="hJmJT4/T";
spf=pass (imf09.hostedemail.com: domain of p.raghav@samsung.com designates
210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com;
dmarc=permerror reason="Multiple policies defined in DNS"
header.from=samsung.com (policy=permerror)
ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679493023; a=rsa-sha256;
cv=none;
b=zlOxxFX1m4xcjvCI2fyPloeoauOm2A6jodD0rm4WUAGqlUeNn5GYd8hp6Uxa0RQn8oqp29
HxxApAi8/HLzCaJN0s8XbXy3R0yz21MKaxYw4PLJXClB0+CoPiZuKYceDexQ5BgaSR8Kyh
kwkXtFxSL0ie2schOF9NHtS3jiHoszE=
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230322135020euoutp016aa46f5214adcd5dc3167c3b3f1dca85~OwgEGNfN22200822008euoutp01D
for ; Wed, 22 Mar 2023 13:50:20 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230322135020euoutp016aa46f5214adcd5dc3167c3b3f1dca85~OwgEGNfN22200822008euoutp01D
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-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFrrHKsWRmVeSWpSXmKPExsWy7djPc7qz2KVTDL6/NbeYs34Nm8Xqu/1s
Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4uT6/8wWNyY8ZbRY
9vU9u8XnpS3sFrs3LmKzOP/3OKvF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi
xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrgjuKySUnNySxLLdK3S+DKeNs9i7VgHl/F
+vsfGBsYz3J3MXJySAiYSMy/fZW5i5GLQ0hgBaPEnb0TWCGcL4wSfYeuMEI4nxkl9s57xATT
smjxH6iq5YwSN+cfYYFwXjJKHD+8mr2LkYODTUBLorGTHSQuInCGUWJK0wxGkG5mgfuMEqf3
soDYwgJGEl0LVoDZLAKqEu+WPGcHsXkFrCSmbwK5A2SbvMT+g2eZQWxOAWuJR4umsUHUCEqc
nPmEBWKmvETz1tlgT0gIrOaUWDTlHQtEs4vEnWMvmSFsYYlXx7ewQ9gyEv93zod6p1ri6Y3f
UM0tjBL9O9ezgXwgAbSt70wOiMksoCmxfpc+RLmjxO8nR5khKvgkbrwVhDiBT2LStulQYV6J
jjYhiGoliZ0/n0AtlZC43DQH6jAPiR/377JMYFScheSZWUiemYWwdwEj8ypG8dTS4tz01GLD
vNRyveLE3OLSvHS95PzcTYzAJHj63/FPOxjnvvqod4iRiYPxEKMEB7OSCK8bs0SKEG9KYmVV
alF+fFFpTmrxIUZpDhYlcV5t25PJQgLpiSWp2ampBalFMFkmDk6pBqb+t7ndbze/rG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dPZJYSTc4Hpou8knhDMwNTQxMzSwNTSzNjJXFez4KORCGB9MSS
1OzU1ILUIpg+Jg5OqQamqAs7O4KSZc9I+En2a19JXN/2+fsCjTPheYaHv2xWUWgSVvnxM475
e/Up5SRhl6arN3Mq9k6//Vh1355v6jNV/X6fqC49d2vWhNjVZhXrfnAWvvNMX3WDzfj8FJmU
2+WJi9/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-Rspam-User:
X-Rspamd-Server: rspam03
X-Stat-Signature: nxt5p3z47k688mqabppzo4joi91cf7ux
X-Rspamd-Queue-Id: BB6D6140021
X-HE-Tag: 1679493022-750055
X-HE-Meta:
U2FsdGVkX19Ej7Zg2Zx0q5zBAcC2+Hh3pQBpk45O41WMixJVLucsRxqrPcqIDei6MnotileUmU4jdYcq3i8tK8O/qc9eGu2ZVWyzJHPKOA+tjo8D1Kja4tBnB+LN6f/2WWH0AnGLKdfR1dsY7KdgXri96Fao8WcY43RpKr27afiCSieJcjcXH2rmhlq1xCHpl7Y+EzUu4xpeWUeFjgdCknHdPVAyS7hDvlZIm0j6x7l2VzLjjv38nDgHSSJAsLCH8+bSKX3nXzNGO9/bDbO8WbiY/c+K/1U1dgH3IvL4wziJBCl603R8cjjI+PYMFJmXlL2yzSazvKtdfT/ZygNS3GIGm807rGeHeJ705ycqOz3FqBPcWjVf4d0ROdTnTSVX9/KjIBEHCLMG+AYh8bpG3txJvDMkB/xXhRti09rJZC8xF/oY6yfbynKWuE+VnFkSyrrqA9zSv7mGxEWVwqFY0igRqsJ3+/x279s/TuAcf+4nyUbs3otvuydF9/LukMX5q8i1mPFNzhOskFKkUFMrhFHvsY/MJ5NItsSu4Dg93Jtj1XEihZYgNUznSuN4ZWoGFyvcftPWA9iCjD0hJ1qp2yvzsMkKMZ1pNqrL0iufPHm5RxMDZRm38qKu5hiyDbWf5akhj+vzVoMvUhKx1dOj5dkxSGKi6stoUhZcglbZoaKg08rTk7BHUKDxpkves+tKDdp6ETPVl++9lpTMx1CMNQ1HiTpHg6r7WfnPOGh08FjkUNuuRqdKJJq2doyNOmZN0bE3hA1jOi9Lo7GGatHJsOWzA8T/aOruERHeEAtcvxTTI46j7yuj0j1vdNO89F0H/s5P/16oT7yOusBwqMiiLgeDYZJHmg29754sLWgaAhQgnh2JvgxWESTjQONgWcEFX9+3AZREeSdiGbj6+sqJwlY4oakH3LtqmBC+E5sLDb8DxvnGsCQfHEcSaRo/nPM0SZW1xMwQGHk7flh6pv6
E+Hq6vnk
m4wSDhm+2vDHgEwsFomvE1Jqox0rRZvqbmEBWr9U7lHX8cPxl6z9+EJzzmtlLmtLErCp9nz7bu/yx21IMFphV7AFjpZ5LJq9pZx9zZZSqkPTDVFyPTNSNQdKdT9bcooVf0QzLIXcqMkWtbEh/EewS2JcLDmRn589Y74+UbgGYGqj852Vssc4YiechVZCwKnHOfNLr
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4
Sender: owner-linux-mm@kvack.org
Precedence: bulk
X-Loop: owner-majordomo@kvack.org
List-ID:
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