From patchwork Mon Apr 3 13:22:17 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 78554
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2313476vqo;
Mon, 3 Apr 2023 06:45:07 -0700 (PDT)
X-Google-Smtp-Source:
AKy350a6+xYFgw2HqF3twMeM03HWil4qS1ObDlkEMs1GhPDctPxsgB59KtVwUbNOmpF9+686w8Mk
X-Received: by 2002:aa7:c449:0:b0:4fd:298a:62cb with SMTP id
n9-20020aa7c449000000b004fd298a62cbmr15594519edr.21.1680529507164;
Mon, 03 Apr 2023 06:45:07 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1680529507; cv=none;
d=google.com; s=arc-20160816;
b=jttqREiwRlM0f9f4LqgdjYT1xoAt7btSCc82doBY8T25FCnrrUW1P3wEZyEOq8CU9e
tsbgh/M7d9lD8zHYu0WJn4LStRvmGtUILr9p+SDCRKqQ/pV0Vioo+2uqOBr2Aqj9SUer
lj7/gl2wmwEaB7fSH2kAub6yftl02N4zGk2MGBozULjlV5CkqBrZhmaskFjsj4662ShT
Wmdf0PSUUx884kx0hAMZik84eFysg0PhTbhmSBmAY0MFlmTVV5zUq3kcXzaTzQ72+/84
21hGqtFadOZ0cfp3OuyGK1uxo9ndF6TheWpiKo4+MZLfx4AAxprJyrtDHNX2H5pNrsZK
rbGQ==
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=r3yJCwvgy++or0tEjkGksO6JgkEF47Bw1cuUMKfgKoM=;
b=0UL7YwV2ZeTVym7XDYFPZeaDsdzjOnNNYGSbSDi7eMeioyHRiv32EuSgXjoxwERl2Q
dtE4I+NNroFLAqgI/5d+OdDlJd3f03vtJ0y8+grz+vn1V7HpwufJb3zuu6T5hIsStWDQ
ypj7nX/ir7AHHakGHc3apUJA5fxlWvtHAwe1UPzT6G2k6bHxw67wxmUWfG0YmAsf0mU2
xkIiMqwW148Uipw0vK5zut4PTudysh4YH3brlRuQuPn9kuhocxD3AYDj3+jXI0D8gTM6
UIeOMa8EHPWYD3MsxoihHHGcHeP9vKhTS84tvIKHrmU/BWQ1iHDCYMMOwr7k0qv0AfdJ
HjuA==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@samsung.com header.s=mail20170921
header.b=fWltD6Kk;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20])
by mx.google.com with ESMTP id
d6-20020aa7d686000000b004bff6dee492si3396226edr.149.2023.04.03.06.44.43;
Mon, 03 Apr 2023 06:45:07 -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=fWltD6Kk;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S232531AbjDCNWh (ORCPT + 99 others);
Mon, 3 Apr 2023 09:22:37 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47922 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S232401AbjDCNWb (ORCPT
);
Mon, 3 Apr 2023 09:22:31 -0400
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5BCDC145
for ;
Mon, 3 Apr 2023 06:22:28 -0700 (PDT)
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230403132225euoutp01970b1b001b2674e1d1df2c016899b91b~Sb3HpH6pV1586215862euoutp019
for ;
Mon, 3 Apr 2023 13:22:25 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230403132225euoutp01970b1b001b2674e1d1df2c016899b91b~Sb3HpH6pV1586215862euoutp019
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680528146;
bh=r3yJCwvgy++or0tEjkGksO6JgkEF47Bw1cuUMKfgKoM=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=fWltD6KkZIQiLs6rw7FKqP0kHRAAW0lYwBmUNzefo4Vc5oXK4N7RNkDQibfTOfl7Z
I/0o0jF3ciGeBau/sXEVvO9q6x1elNyuG0Iaer1trBR7e4ZITxAThf1z4eDtnOkLRn
8miNtIU3MXpzqC/SC9TgDLLQvc94kF8B/bkHURvA=
Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20230403132224eucas1p27eef4cb0f80d1f84327e722cb3e4bc85~Sb3GIBA7H2688526885eucas1p2U;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges2new.samsung.com (EUCPMTA) with SMTP id CA.F2.09966.013DA246;
Mon, 3
Apr 2023 14:22:24 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20230403132223eucas1p2a27e8239b8bda4fc16b675a9473fd61f~Sb3FmBsJj2689126891eucas1p2k;
Mon, 3 Apr 2023 13:22:23 +0000 (GMT)
Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20230403132223eusmtrp210c81c0bd1e7b9dfa5cc043be99aaf05~Sb3FlI5ir0199801998eusmtrp2f;
Mon, 3 Apr 2023 13:22:23 +0000 (GMT)
X-AuditID: cbfec7f4-d4fff700000026ee-44-642ad3104b1c
Received: from eusmtip1.samsung.com ( [203.254.199.221]) by
eusmgms1.samsung.com (EUCPMTA) with SMTP id AC.16.08862.F03DA246;
Mon, 3
Apr 2023 14:22:23 +0100 (BST)
Received: from localhost (unknown [106.210.248.30]) by eusmtip1.samsung.com
(KnoxPortal) with ESMTPA id
20230403132223eusmtip1f594e7a855855fa3ec15e1be498a2f26~Sb3FXqusJ2519425194eusmtip1C;
Mon, 3 Apr 2023 13:22:23 +0000 (GMT)
From: Pankaj Raghav
To: axboe@kernel.dk, minchan@kernel.org, martin@omnibond.com,
hubcap@omnibond.com, brauner@kernel.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, akpm@linux-foundation.org,
willy@infradead.org, hch@lst.de
Cc: devel@lists.orangefs.org, mcgrof@kernel.org,
linux-block@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, gost.dev@samsung.com,
linux-fsdevel@vger.kernel.org, Pankaj Raghav
Subject: [PATCH v2 1/5] zram: always chain bio to the parent in
read_from_bdev_async
Date: Mon, 3 Apr 2023 15:22:17 +0200
Message-Id: <20230403132221.94921-2-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230403132221.94921-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrGKsWRmVeSWpSXmKPExsWy7djP87oCl7VSDJa8FrKYs34Nm8Xqu/1s
Fq8Pf2K02L95CpPFzQM7mSxWrj7KZNF+t4/JYu8tbYs9e0+yW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t/8qlcFOWa1s6bvTXqeo5wvdSjTU86tfYI7q7qV53NeDmE58B+MdspfD6Jt2ds
fPopP2/5+SW3p3CIWzyRvvpE/NnV2Mb7l6KOb2pbc5DD1GeJ38qXb4280hesCtvzKtNPm+ma
mFZJs0pm4d39L3dXz363NH3/4R0ywe7ZPHoPfTl+KrEUZyQaajEXFScCAJm7B9lqAwAA
X-CMS-MailID: 20230403132223eucas1p2a27e8239b8bda4fc16b675a9473fd61f
X-Msg-Generator: CA
X-RootMTR: 20230403132223eucas1p2a27e8239b8bda4fc16b675a9473fd61f
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230403132223eucas1p2a27e8239b8bda4fc16b675a9473fd61f
References: <20230403132221.94921-1-p.raghav@samsung.com>
X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,
RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS
autolearn=unavailable autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
lindbergh.monkeyblade.net
Precedence: bulk
List-ID:
X-Mailing-List: linux-kernel@vger.kernel.org
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
X-GMAIL-THRID: =?utf-8?q?1762162908438784215?=
X-GMAIL-MSGID: =?utf-8?q?1762162908438784215?=
zram_bvec_read() is called with the bio set to NULL only in
writeback_store() function. When a writeback is triggered,
zram_bvec_read() is called only if ZRAM_WB flag is not set. That will
result only calling zram_read_from_zspool() in __zram_bvec_read().
rw_page callback used to call read_from_bdev_async with a NULL parent
bio but that has been removed since commit 3222d8c2a7f8
("block: remove ->rw_page").
We can now safely always call bio_chain() as read_from_bdev_async() will
be called with a parent bio set. A WARN_ON_ONCE is added if this function
is called with parent set to NULL.
Signed-off-by: Pankaj Raghav
Acked-by: Minchan Kim
---
drivers/block/zram/zram_drv.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 3feadfb96114..d16d0630b178 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,11 +625,10 @@ 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
- bio_chain(bio, parent);
+ if (WARN_ON_ONCE(!parent))
+ return -EINVAL;
+ bio_chain(bio, parent);
submit_bio(bio);
return 1;
}
From patchwork Mon Apr 3 13:22:18 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 78558
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2314131vqo;
Mon, 3 Apr 2023 06:46:06 -0700 (PDT)
X-Google-Smtp-Source:
AKy350a+z7fDE54rgC3VsyXBRJMNxWqq4anU5DFYjDz8x6SsDsCna3oE6uFhSsKdajuA4/awexmj
X-Received: by 2002:a17:906:4ac4:b0:921:412b:d8c1 with SMTP id
u4-20020a1709064ac400b00921412bd8c1mr35792608ejt.71.1680529566544;
Mon, 03 Apr 2023 06:46:06 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1680529566; cv=none;
d=google.com; s=arc-20160816;
b=saALh7XBBfR7XIRfZNo6p4hG63PQroVuJ8lHJTIudi9qhjfj7NX7IAcJqyowtVFitJ
byTs7QNRB42Uq5kD+VhQIXpG16CoSdhtcsrkWvDVLOFkNvWNnQjB+VpLr6UQ3bdbWZ7L
9ElYpfLM0cIU6SzWsJ1KvwAwuCLzNfT2WwFhhnOAUk0ubwaStV502Eyx2JDCe5NUqxHZ
4lu6Xo4Czd6VeuhD/TAghelMvPUQe7qnk0OTSYfp9+5gjbUsR0vHjv0XFKKyfAiaSGbR
D2aqfwuilQP+eIPSDIFeiv4NUT2arlnRGd5sa91d1KaWF8kl3kaLaiVuYcPYyav+voo7
2stw==
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=cv+Hj0FwPtC3HT2R3DDLLPaYMWixtk1Tvm8cFC27+6k=;
b=OXOc9kNA1ydpBgF2ptAUhq57JgablvjeJz1zbvSt2eM/e//9E+h+IhUMZep2zsgA0Z
wtroHnhnXuZE4D463QD/SDnXD9y25Lpo86Efcdy1jh4PPqyuBFhA6s4l1EIMEfW2nZyE
M086cs/VesMRvcxMgK7nPgONuDiOB3FPtelzHgjCnk/5pvRYRNqqiRtreYTtMZBg6Shk
2L5h5EieU86u8AirI8HH+Sqxfl90kvUJ10hhQdLxwvvat4F4wpyP692meJd252gCS97/
n81izVhpXAbMIvaA++5Zubm28EJtE7Il74xiMNCxWWaNEXOESwMExfpvSML3H68iZNMS
vKOA==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@samsung.com header.s=mail20170921
header.b=B39O5prH;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20])
by mx.google.com with ESMTP id
u13-20020a056402064d00b00501da7bdea9si547202edx.228.2023.04.03.06.45.42;
Mon, 03 Apr 2023 06:46:06 -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=B39O5prH;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S232324AbjDCNWl (ORCPT + 99 others);
Mon, 3 Apr 2023 09:22:41 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47926 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S232366AbjDCNWb (ORCPT
);
Mon, 3 Apr 2023 09:22:31 -0400
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A88E043
for ;
Mon, 3 Apr 2023 06:22:28 -0700 (PDT)
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230403132226euoutp0105a1e57c6b7bd57f49077e0a84d7df88~Sb3IIAKEz1624016240euoutp01E
for ;
Mon, 3 Apr 2023 13:22:26 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230403132226euoutp0105a1e57c6b7bd57f49077e0a84d7df88~Sb3IIAKEz1624016240euoutp01E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680528146;
bh=cv+Hj0FwPtC3HT2R3DDLLPaYMWixtk1Tvm8cFC27+6k=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=B39O5prHjZY0V7xuyRpKWUkJhlL0o/dYBrAbqOAY8Wj+XGSawtVbwCkB8ZooCJsVK
sjQbZYJgRELCcwxoaywLcVa6kbH5RSuTWfojHZ9KvOLyiRXK0u/fhvXXZLIa8Ws2iB
R4O4ttoX5iWGfhcl5DnEgDqA/34PsVWAMkCn8fLw=
Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by
eucas1p1.samsung.com (KnoxPortal) with ESMTP id
20230403132224eucas1p1dd063339ab3dd7e50f716c30dfa6c3d7~Sb3Gm84Sm0205602056eucas1p1F;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges3new.samsung.com (EUCPMTA) with SMTP id F9.F9.10014.013DA246;
Mon, 3
Apr 2023 14:22:24 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20230403132224eucas1p28f82802bc40d4feb5a30bb59c6536ab3~Sb3GIDjiU1827918279eucas1p2r;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20230403132224eusmtrp2743cb3eb410ee96b9ce1aef1859b792d~Sb3GHEWDm0200802008eusmtrp2K;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
X-AuditID: cbfec7f5-b8bff7000000271e-c8-642ad310e985
Received: from eusmtip1.samsung.com ( [203.254.199.221]) by
eusmgms2.samsung.com (EUCPMTA) with SMTP id 35.ED.09583.013DA246;
Mon, 3
Apr 2023 14:22:24 +0100 (BST)
Received: from localhost (unknown [106.210.248.30]) by eusmtip1.samsung.com
(KnoxPortal) with ESMTPA id
20230403132224eusmtip1acb8b48c14dc2c7e83cb18c349594e39~Sb3F5SUdL2319123191eusmtip1F;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
From: Pankaj Raghav
To: axboe@kernel.dk, minchan@kernel.org, martin@omnibond.com,
hubcap@omnibond.com, brauner@kernel.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, akpm@linux-foundation.org,
willy@infradead.org, hch@lst.de
Cc: devel@lists.orangefs.org, mcgrof@kernel.org,
linux-block@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, gost.dev@samsung.com,
linux-fsdevel@vger.kernel.org, Pankaj Raghav
Subject: [PATCH v2 2/5] orangefs: use folios in orangefs_readahead
Date: Mon, 3 Apr 2023 15:22:18 +0200
Message-Id: <20230403132221.94921-3-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230403132221.94921-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA02SfUxbVRjGc+5tb28LbS6FjBdsmHQhxo5P0eSg6EBJvENJ/GPLUGegGTes
o+WjBb+2aJFFXJ2MTCcTqizMCYNqpYyNFnATNhHHx7Y6B0yYwWImH+2EEgsE6srt4v77vec8
z/ucJzk0Kf9bGE1riss5fbFaq6QkgvM/rYwmME5VQXKLNxmbrRYKt00eo/Bc/yLCFzs+I/D4
JTuBz7ZdIXD1ZA2Beye2457eQQF2OswUnrL4hXjQ6ifxWO0Mwt8se0R46cxhEe5ub6Lw6PqA
EK/5zFSGnG0wXhewHS0q1jlcwdpaj1CsbfG4iP355JqANZ6YoNjucSPFrt7+XcjWnGtF7JIt
hrW5FohXQl+TpBdwWs2bnD7puXzJ/mvVnWSpU/L2qmlRZES3aRMS08A8CQ6fhzIhCS1nWhA0
Tp8i+MGLoGv8uogflhB4710jH1gWTHNBSzMCu/sm4oe7CC5M24UmRNMUo4LKI5vuCGYCwfzR
hs29JHMHwVfdvURgVTjzPJjrbgkDLGDioGrkXxRgKZMG89UnBHzcVrj44/BmtJh5Girrvgxq
wmDwC9emhryvqepsIAMBwFwQw8ySB/HmLOi5+rmQ53CYHTgn4lkBfnsjwfNBmBlb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eAijg4
2AS0JBo72UHiIiDxZReOs4A4zALPGSXWTPnNDNItLOAkMWf6dVYQm0VAVaL53HewqbwClhJv
2qeyQGyQl9h/8CxYPaeAlUTj9LlgNUJANV8v3mKFqBeUODnzCVg9M1B989bZzBMYBWYhSc1C
klrAyLSKUSS1tDg3PbfYSK84Mbe4NC9dLzk/dxMjMIq3Hfu5ZQfjylcf9Q4xMnEwHmKU4GBW
EuFV7dJKEeJNSaysSi3Kjy8qzUktPsRoCnT3RGYp0eR8YBrJK4k3NDMwNTQxszQwtTQzVhLn
9SzoSBQSSE8sSc1OTS1ILYLpY+LglGpgcilVf7KCv+Lyc/6jD2JqbHY0XMnU0pn2dG/oFBvj
dTsktU4r2bfY74izZbxxUbaxzv/BLhvR54YWTzrONwrx83T4Hvwad+eOF39h2uKjrxVOCQto
nnHr5pB5L6U0tasvlX/OOh1fRc0bkmn+cdqax3m/Hz4o6BnBfn2yIr/3kew6tqoF2TIT4+sD
5Bu7p+h83uXn/P3OTCZjtereyvd/FjNOOGV/OqJ3rZL25H3PHi8y8OV37mfqV899l3PAbqmA
WvoxNfOGvZav762ZKbtJ/EGHVq7elQAF11leb6ZU3Pz8LOyAqwK74BYpJ2/HR1cab/4OdnRZ
MuWqGFOz2CzjeynHKpymrpu4b8m61GAlluKMREMt5qLiRADatwx8awMAAA==
X-CMS-MailID: 20230403132224eucas1p28f82802bc40d4feb5a30bb59c6536ab3
X-Msg-Generator: CA
X-RootMTR: 20230403132224eucas1p28f82802bc40d4feb5a30bb59c6536ab3
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230403132224eucas1p28f82802bc40d4feb5a30bb59c6536ab3
References: <20230403132221.94921-1-p.raghav@samsung.com>
X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,
RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS
autolearn=unavailable autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
lindbergh.monkeyblade.net
Precedence: bulk
List-ID:
X-Mailing-List: linux-kernel@vger.kernel.org
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
X-GMAIL-THRID: =?utf-8?q?1762162970700535998?=
X-GMAIL-MSGID: =?utf-8?q?1762162970700535998?=
Convert orangefs_readahead() from using struct page to struct folio.
This conversion removes the call to page_endio() which is soon to be
removed, and simplifies the final page handling.
The page error flags is not required to be set in the error case as
orangefs doesn't depend on them.
Reviewed-by: Matthew Wilcox (Oracle)
Tested-by: Mike Marshall
Signed-off-by: Pankaj Raghav
Reviewed-by: Christoph Hellwig
---
fs/orangefs/inode.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index aefdf1d3be7c..9014bbcc8031 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -244,7 +244,7 @@ static void orangefs_readahead(struct readahead_control *rac)
struct iov_iter iter;
struct inode *inode = rac->mapping->host;
struct xarray *i_pages;
- struct page *page;
+ struct folio *folio;
loff_t new_start = readahead_pos(rac);
int ret;
size_t new_len = 0;
@@ -275,9 +275,10 @@ static void orangefs_readahead(struct readahead_control *rac)
ret = 0;
/* clean up. */
- while ((page = readahead_page(rac))) {
- page_endio(page, false, ret);
- put_page(page);
+ while ((folio = readahead_folio(rac))) {
+ if (!ret)
+ folio_mark_uptodate(folio);
+ folio_unlock(folio);
}
}
From patchwork Mon Apr 3 13:22:19 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 78542
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2300775vqo;
Mon, 3 Apr 2023 06:26:17 -0700 (PDT)
X-Google-Smtp-Source:
AKy350bbmS8jrushWhN/LbBGa5RQNXjECig9M5O+hLzuD18W+EwL7oRd7Yqdi3uJQfsPB4DiKjcV
X-Received: by 2002:a17:906:36d7:b0:93d:cffb:80ba with SMTP id
b23-20020a17090636d700b0093dcffb80bamr36193729ejc.66.1680528376896;
Mon, 03 Apr 2023 06:26:16 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1680528376; cv=none;
d=google.com; s=arc-20160816;
b=LtjTjBpNRNbUCPCyVv9wLCkDJivvlwMQmQ36QV7ZhWehAx2I0jRofTkelGSEgQXgPk
leVmcLI3xBf8lEQHtR1klu93R/S5VJv+UUgy8gsISAVH3jDX79cNm4vvwYU6vSELw+oE
zdM1PQrheqnQYuqwa9yqfsqInef91JoOANO31TLeIsRnCGkTh0PljxsAdwJWKKxHtoqQ
K5q5J+HbSZERE6pFfhawC+dudzzlQY3sX62QCaME0eK1MDvqVSE+/Ds8en6VnAnY+SYJ
eJjV6mOcca1Wcm9vHFINNtFaiKTdQSDOZtVpteUvuvZMBil9m1I8MscUkjWcA8BQOhvP
MpQw==
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=GJWEA5PjSEVU4Ixy8YE83oY4qQGZqJMne5595ZZmstQLqaIdUAyNICGaaMlIeO9z/d
dBSonpbcRZxaEnVP+Jo5B/rI6Ij2kzSYQO5VX3ujCrcKc/hPEwvEFBcpTOI9vtrY449Y
d9bu/hbEXp3bPVXTt9vJeI3/6Frx5bMCzYjPu+rSse9hL/pTAgoNV2l0Q537xg9h80or
LDcCjVeLne0KsaqIaVSBEUofPEk0LI6MR5VjDKnZo4wEhd5pgX+5VovXYW5nrOtVprUP
t6WBhO5+IhKav3RieWNk/1SdQa+cq56OV5h+luZ8c4Yo6KdX28h39eMDOllVacqWf18L
l7hg==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@samsung.com header.s=mail20170921
header.b=r++2oaFN;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20])
by mx.google.com with ESMTP id
t9-20020a1709066bc900b0093b6e1440b3si3343222ejs.764.2023.04.03.06.25.52;
Mon, 03 Apr 2023 06:26: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=r++2oaFN;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S232386AbjDCNWd (ORCPT + 99 others);
Mon, 3 Apr 2023 09:22:33 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47896 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S232126AbjDCNWa (ORCPT
);
Mon, 3 Apr 2023 09:22:30 -0400
Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com
[210.118.77.12])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27A41B75A
for ;
Mon, 3 Apr 2023 06:22:28 -0700 (PDT)
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id
20230403132226euoutp02c689b2599ea99258d6f9960699146eaf~Sb3IdslyA1374413744euoutp02x
for ;
Mon, 3 Apr 2023 13:22:26 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com
20230403132226euoutp02c689b2599ea99258d6f9960699146eaf~Sb3IdslyA1374413744euoutp02x
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680528146;
bh=5/+0KaEbpjyZkaLqtYLBQz1+pPqkvr1OOiQOg6+VTQI=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=r++2oaFN0N0+G2S72qO8e7Cw6GtX3TD1d5DuTTMDG1WzMvdZZCbjPPf5CdK/g82XQ
0i0Ws6YK2Ki8ER/EpnURSfsgnkLG91B92CBR6PYPIK182Btxcn7MN6l0oov3BfAmk7
IcYiJhbCpv60tSR/+MHwNvetQdvPDop0fg+0ibg4=
Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20230403132225eucas1p2eeb69651b019e4e779166e8b360a7342~Sb3HE0Gyc2688526885eucas1p2X;
Mon, 3 Apr 2023 13:22:25 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges1new.samsung.com (EUCPMTA) with SMTP id 2B.F4.09503.113DA246;
Mon, 3
Apr 2023 14:22:25 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20230403132224eucas1p21fd296fbd4af70220331bb19023f4169~Sb3Gsa2HH2688526885eucas1p2W;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20230403132224eusmtrp2025b29c3cb119969b17b4113d6677db0~Sb3GrwLJb0200802008eusmtrp2L;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
X-AuditID: cbfec7f2-e8fff7000000251f-b4-642ad311da86
Received: from eusmtip1.samsung.com ( [203.254.199.221]) by
eusmgms1.samsung.com (EUCPMTA) with SMTP id 7E.16.08862.013DA246;
Mon, 3
Apr 2023 14:22:24 +0100 (BST)
Received: from localhost (unknown [106.210.248.30]) by eusmtip1.samsung.com
(KnoxPortal) with ESMTPA id
20230403132224eusmtip14497bed1922f57dfc44ffe4d39a2dff3~Sb3Ge5UWK2612826128eusmtip1B;
Mon, 3 Apr 2023 13:22:24 +0000 (GMT)
From: Pankaj Raghav
To: axboe@kernel.dk, minchan@kernel.org, martin@omnibond.com,
hubcap@omnibond.com, brauner@kernel.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, akpm@linux-foundation.org,
willy@infradead.org, hch@lst.de
Cc: devel@lists.orangefs.org, mcgrof@kernel.org,
linux-block@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, gost.dev@samsung.com,
linux-fsdevel@vger.kernel.org, Pankaj Raghav
Subject: [PATCH v2 3/5] mpage: split bi_end_io callback for reads and writes
Date: Mon, 3 Apr 2023 15:22:19 +0200
Message-Id: <20230403132221.94921-4-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230403132221.94921-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrKKsWRmVeSWpSXmKPExsWy7djP87qCl7VSDDY8F7aYs34Nm8Xqu/1s
Fq8Pf2K02L95CpPFzQM7mSxWrj7KZNF+t4/JYu8tbYs9e0+yWFzeNYfN4t6a/6wWJ9f/Z7a4
MeEpo8Wyr+/ZLT4vbWG32L1xEZvF+b/HWS1+/5jD5iDkMbvhIovH5hVaHpfPlnpsWtXJ5rHp
0yR2jxMzfrN4NEy9xeax+2YDm8ev23dYPfq2rGL0+LxJzmPTk7dMATxRXDYpqTmZZalF+nYJ
XBmrNvgX/OOp+LvOt4HxGFcXIyeHhICJxP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R: 20230403132224eucas1p21fd296fbd4af70220331bb19023f4169
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230403132224eucas1p21fd296fbd4af70220331bb19023f4169
References: <20230403132221.94921-1-p.raghav@samsung.com>
X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,
RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS
autolearn=unavailable autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
lindbergh.monkeyblade.net
Precedence: bulk
List-ID:
X-Mailing-List: linux-kernel@vger.kernel.org
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
X-GMAIL-THRID: =?utf-8?q?1762161723663563912?=
X-GMAIL-MSGID: =?utf-8?q?1762161723663563912?=
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 Mon Apr 3 13:22:20 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 78556
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2313600vqo;
Mon, 3 Apr 2023 06:45:20 -0700 (PDT)
X-Google-Smtp-Source:
AKy350a4Ld7Kb7XDUX+z47rV5dIW+qTiUKOq3MY2SzwQ4JgwsAJa81y0I6H2eN8aHcNITTHl4/Fz
X-Received: by 2002:a17:906:eb49:b0:889:58bd:86f1 with SMTP id
mc9-20020a170906eb4900b0088958bd86f1mr36724272ejb.14.1680529520622;
Mon, 03 Apr 2023 06:45:20 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1680529520; cv=none;
d=google.com; s=arc-20160816;
b=YzHdKH80n1+nd0OomBBOnWhD5tPHPTh+6SLpxSoqE6Q7iXxeXn+iFkUPPvbqr+wg4X
in7T4WYEeDhcgg1lXVoOYYlECVIo6va5xO9gGAb6/yZ1O/9pJjwsRDpICvlJh6nbzQUo
DW24Zmp2+k6ZBQwukP4N8TywOpFXeni4ReHxtczqrLv+LA37k9SJLShuoNJyhul9Ypba
nyKWY+z1n/ZZwPOvk1SFIAhROsjjV5pOInKSIBPtJKtf7kJsaL9u19QgYMRHfyY7rONw
7EN0Jsa/I/9Ig1YwkfrzAWRExWHr+wfuT5ScAhbpm+6VuvvoGtRToYQgPVIvjZFs7yPz
VHyA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=list-id:precedence:references:cms-type:content-transfer-encoding
:mime-version:in-reply-to:message-id:date:subject:cc:to:from
:dkim-signature:dkim-filter;
bh=C4y5H34/b66lYzmCayiry+Dr/iI1gotrFjxRhbqI+PI=;
b=W8pmr53I80YMgDXKAWDtsHEVSaAkBNBB56QxDR7DiSr0CiUo4FcJyr1Xl/Y2uJ3mD8
D51Am9AxjBqrYNkylskQMj1WcFJBMnSSlKuDISUaWYUsHUDHEeONNT+DI7hUpy5JbhYV
fWNrudeN8Bj/s4RWvsAID8oYWUDr7v9OZ0ZzPM6oR25nkkt0WcoLzGgxiQdWyz3XUg8I
4gA9XHoJQ3mnWdK+xlM9EyjsRrWvdJl8sD+bt8Em8B5LvjdOXhPWZLMUQ8u1Oh18GLbn
XonSASkMFIXfOzphhpZW9JqcWr3bcDIGBfakzK2yqAvQ16if10F+Y4QlGhBL5BF3+zHf
3ZZw==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@samsung.com header.s=mail20170921
header.b=WXp2Xael;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20])
by mx.google.com with ESMTP id
q4-20020a170906388400b00931038178ecsi6338207ejd.330.2023.04.03.06.44.57;
Mon, 03 Apr 2023 06:45:20 -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=WXp2Xael;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S232579AbjDCNWu (ORCPT + 99 others);
Mon, 3 Apr 2023 09:22:50 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48008 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S231795AbjDCNWd (ORCPT
);
Mon, 3 Apr 2023 09:22:33 -0400
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E73CCA0B
for ;
Mon, 3 Apr 2023 06:22:32 -0700 (PDT)
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230403132227euoutp012a29ce89d5b4404e7a0d85ef0738a971~Sb3JIUbm61624016240euoutp01H
for ;
Mon, 3 Apr 2023 13:22:27 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230403132227euoutp012a29ce89d5b4404e7a0d85ef0738a971~Sb3JIUbm61624016240euoutp01H
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680528147;
bh=C4y5H34/b66lYzmCayiry+Dr/iI1gotrFjxRhbqI+PI=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=WXp2XaelSwCkYKfkU9KMaQBicOuPO5FCl6eazPBuaqDzxeI0oeAp8adbZL8WddZmx
X7uAsdaOnFuuiLwMj/35Lgs8J5U4FynuBTYEt2GUI96Y7F7qp/ZfxHo532agr5ULM5
JawW7/UyfI363OcIirmZR3Qt5uDyxChn97iVJZfQ=
Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20230403132226eucas1p27c60b550a84a0f9a8d83aeb35c2131a7~Sb3Hq6jkH1831918319eucas1p26;
Mon, 3 Apr 2023 13:22:26 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges1new.samsung.com (EUCPMTA) with SMTP id 9C.F4.09503.113DA246;
Mon, 3
Apr 2023 14:22:25 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p1.samsung.com (KnoxPortal) with ESMTPA id
20230403132225eucas1p15848db3c850e950b21b339d5861080e1~Sb3HLozNU1121911219eucas1p1e;
Mon, 3 Apr 2023 13:22:25 +0000 (GMT)
Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20230403132225eusmtrp222d08e847a640f99b1692735673dfaa4~Sb3HK3YsO0200802008eusmtrp2N;
Mon, 3 Apr 2023 13:22:25 +0000 (GMT)
X-AuditID: cbfec7f2-ea5ff7000000251f-b8-642ad3114817
Received: from eusmtip1.samsung.com ( [203.254.199.221]) by
eusmgms1.samsung.com (EUCPMTA) with SMTP id EF.16.08862.113DA246;
Mon, 3
Apr 2023 14:22:25 +0100 (BST)
Received: from localhost (unknown [106.210.248.30]) by eusmtip1.samsung.com
(KnoxPortal) with ESMTPA id
20230403132225eusmtip18dbb686db7c510460cd06cbef5485d8b~Sb3G_SMEG2613126131eusmtip1C;
Mon, 3 Apr 2023 13:22:25 +0000 (GMT)
From: Pankaj Raghav
To: axboe@kernel.dk, minchan@kernel.org, martin@omnibond.com,
hubcap@omnibond.com, brauner@kernel.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, akpm@linux-foundation.org,
willy@infradead.org, hch@lst.de
Cc: devel@lists.orangefs.org, mcgrof@kernel.org,
linux-block@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, gost.dev@samsung.com,
linux-fsdevel@vger.kernel.org, Pankaj Raghav
Subject: [PATCH v2 4/5] mpage: use folios in bio end_io handler
Date: Mon, 3 Apr 2023 15:22:20 +0200
Message-Id: <20230403132221.94921-5-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230403132221.94921-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrOKsWRmVeSWpSXmKPExsWy7djP87qCl7VSDPZftbKYs34Nm8Xqu/1s
Fq8Pf2K02L95CpPFzQM7mSxWrj7KZNF+t4/JYu8tbYs9e0+yWFzeNYfN4t6a/6wWJ9f/Z7a4
MeEpo8Wyr+/ZLT4vbWG32L1xEZvF+b/HWS1+/5jD5iDkMbvhIovH5hVaHpfPlnpsWtXJ5rHp
0yR2jxMzfrN4NEy9xeax+2YDm8ev23dYPfq2rGL0+LxJzmPTk7dMATxRXDYpqTmZZalF+nYJ
XBkLXl5iKZjAW/Hn0j62BsY7XF2MnBwSAiYS16etY+li5OIQEljBKDF50wF2COcLo0Tr6g9Q
zmdGiRNrTrDCtBxa9IEJIrGcUWL7yV1sEM4LRolvsx4ADePgYBPQkmjsBOsWEbjFKPGmZzZY
B7PAfUaJebv3MoGMEhawl9jZupYRxGYRUJV4daYDzOYVsJSYd/ITI8Q6eYn9B88yg9icAlYS
jdPnQtUISpyc+YQFxGYGqmneOpsZon43p8SRWzwQtovE/5MroeLCEq+Ob2GHsGUk/u+czwRh
V0s8vfGbGeQ4CYEWRon+nevZQD6QELCW6DuTA2IyC2hKrN+lD1HuKPFkww1miAo+iRtvBSEu
4JOYtG06VJhXoqNNCKJaSWLnzydQSyUkLjfNYYEo8ZDYdttuAqPiLCSvzELyyiyEtQsYmVcx
iqeWFuempxYb5qWW6xUn5haX5qXrJefnbmIEpsXT/45/2sE499VHvUOMTByMhxglOJiVRHhV
u7RShHhTEiurUovy44tKc1KLDzFKc7AoifNq255MFhJITyxJzU5NLUgtgskycXBKNTAJO134
cCdwdq20nBjzy44lUamL4oTnOPB08ER7JUsdXLMvd3KZ69c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0OR+YRPJK4g3NDEwNTcwsDUwtzYyV
xHk9CzoShQTSE0tSs1NTC1KLYPqYODilGpiymk/w5G2oWj4r4iKrZdfjvPB16yJijvkc2Jnm
WDdd5JXYulznR9H9u4Ry3H4J/3X/LFgXUO//L6H1ghvz+woPFR9nWeZnobVbo+w5T/voWmQd
+iAo0H6I78Tq2Tu0pktYhS2N1J+7bkZuTmj9m0+t0nV7tp2wrO97Kv/xh+CNZadbah/8/757
OdPL7sYPC3a++6l9bLKr7irvLbtf3Z1SlS0Z9rrwk5mNvnva6/zmywuLVgZoHdoafePuIuuf
1yeznihwWjFRaElt+A+rm79DOXvurOLm9XO772+Q8+P0YunoHuEqjxUzvDj3zD45c+7aJYHp
p4RjGD4HX/p/gM307p3dEnGeWyQSbRbufzJPiaU4I9FQi7moOBEAW9tMD2oDAAA=
X-CMS-MailID: 20230403132225eucas1p15848db3c850e950b21b339d5861080e1
X-Msg-Generator: CA
X-RootMTR: 20230403132225eucas1p15848db3c850e950b21b339d5861080e1
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230403132225eucas1p15848db3c850e950b21b339d5861080e1
References: <20230403132221.94921-1-p.raghav@samsung.com>
X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,
RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS
autolearn=unavailable autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
lindbergh.monkeyblade.net
Precedence: bulk
List-ID:
X-Mailing-List: linux-kernel@vger.kernel.org
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
X-GMAIL-THRID: =?utf-8?q?1762162922486246534?=
X-GMAIL-MSGID: =?utf-8?q?1762162922486246534?=
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
Reviewed-by: Christoph Hellwig
---
fs/mpage.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/fs/mpage.c b/fs/mpage.c
index 3a545bf0f184..6f43b7c9d4de 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -45,13 +45,15 @@
*/
static void mpage_read_end_io(struct bio *bio)
{
- struct bio_vec *bv;
- struct bvec_iter_all iter_all;
+ struct folio_iter fi;
+ int err = blk_status_to_errno(bio->bi_status);
- bio_for_each_segment_all(bv, bio, iter_all) {
- struct page *page = bv->bv_page;
- page_endio(page, REQ_OP_READ,
- blk_status_to_errno(bio->bi_status));
+ bio_for_each_folio_all(fi, bio) {
+ if (!err)
+ folio_mark_uptodate(fi.folio);
+ else
+ folio_set_error(fi.folio);
+ folio_unlock(fi.folio);
}
bio_put(bio);
@@ -59,13 +61,15 @@ static void mpage_read_end_io(struct bio *bio)
static void mpage_write_end_io(struct bio *bio)
{
- struct bio_vec *bv;
- struct bvec_iter_all iter_all;
+ struct folio_iter fi;
+ int err = blk_status_to_errno(bio->bi_status);
- bio_for_each_segment_all(bv, bio, iter_all) {
- struct page *page = bv->bv_page;
- page_endio(page, REQ_OP_WRITE,
- blk_status_to_errno(bio->bi_status));
+ bio_for_each_folio_all(fi, bio) {
+ if (err) {
+ folio_set_error(fi.folio);
+ mapping_set_error(fi.folio->mapping, err);
+ }
+ folio_end_writeback(fi.folio);
}
bio_put(bio);
From patchwork Mon Apr 3 13:22:21 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 78552
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2312472vqo;
Mon, 3 Apr 2023 06:43:26 -0700 (PDT)
X-Google-Smtp-Source:
AKy350YKDeWedZNcTNzsu9rQEgk1jqxgkmCEtDJR0hfc1Ilf0HMYKje1TB4NKduMgZHmEkJn8K63
X-Received: by 2002:a05:6402:1394:b0:502:9a70:3a39 with SMTP id
b20-20020a056402139400b005029a703a39mr4136056edv.1.1680529406094;
Mon, 03 Apr 2023 06:43:26 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1680529406; cv=none;
d=google.com; s=arc-20160816;
b=HgKe57fnPd4JTvCYHwhyINiPH1axh9Trfkbt40owv8s32iDF86yNLUtfN5teUAo10s
Hmbr2/9HV2Wl5VTgUeRLrgtOZgssqaAyjeFLOXXZR9ARXcanCdR4PlvVes3MR81yDhOS
kzPkw9Ec3g/vb7Req3PQw7lwA2CekbngTuVaTeI77WX+LbIhXTpmXa1+IQlRIPHQtR0d
Q93jNSB4cMqQbL2vUeL5FVUTWioY0GADEcXKR9v5ppVLs2QWWw1MXJ4t9Cps0OmkMgz4
qA1oSkCpz2jx71nr3SIzHiKGKFE3mRzJ97R6QBCpEyCJZkX1QhLeX5DGLh/FvI9Z74+Q
Aokg==
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=d4TEg4peqXV6VFV1L7Z4wKevgfyea3IGE7bICocvtZ6cydopja6fEQE/glTWLKVQSN
Dr5RU1DQrTnkaw//w8jGA61CZPfknQG+MjhBSAuGFrgEYjJh5IeSAVPrCRJJVF2adYGL
/XZQ3IeiR111GGGC0kN6L36fcm1CuFlaaKcLy8l8Ws25jjAAIrgpzidvNrAZ/ZLjnYyD
L95tAo1dxw+hZNt3wxRnXVpc+gH1nOkGZAJ8D56wj/SOvNv6dNpGcTpbPp/JKQXgOyrT
e7kMdC1PltSPh2VY61wnUUD/S2Nh/rE6Pf1q1Ta40jfQ/eJYJZ6wGTwrT3R6ouwH10n2
dBMA==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@samsung.com header.s=mail20170921
header.b=MGRaqrsH;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20])
by mx.google.com with ESMTP id
d6-20020aa7d686000000b004bff6dee492si3396226edr.149.2023.04.03.06.43.02;
Mon, 03 Apr 2023 06:43: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=MGRaqrsH;
spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org
designates 2620:137:e000::1:20 as permitted sender)
smtp.mailfrom=linux-kernel-owner@vger.kernel.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S232431AbjDCNWp (ORCPT + 99 others);
Mon, 3 Apr 2023 09:22:45 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48076 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S232520AbjDCNWe (ORCPT
);
Mon, 3 Apr 2023 09:22:34 -0400
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72DE212061
for ;
Mon, 3 Apr 2023 06:22:32 -0700 (PDT)
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230403132227euoutp01e5f7bcc5ac1462faf67f0ab251edc4d0~Sb3JgUNpP1624716247euoutp011
for ;
Mon, 3 Apr 2023 13:22:27 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230403132227euoutp01e5f7bcc5ac1462faf67f0ab251edc4d0~Sb3JgUNpP1624716247euoutp011
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680528148;
bh=Qd/EHq/hNi9U0eDQzSkYHva3vzVuhQ3/uVr2IhrtsQQ=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=MGRaqrsHJe/tM105jDHB0ftOz4tp9ykwUxKohoKXQeZyo/fTZFWFs7pnTJgch+XaC
wL30I+NBkQCi7jwOHC0BVgsqKS06FTu2EMa4YOhiV+gpeTOSStNq5avdwfH/LZxBth
/X293VQRjzjIueCXtZeJnU/zJdCzUIg7CEnR4EaQ=
Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20230403132226eucas1p225350ac5d8a5d0d5516b7d1cf8fb6e30~Sb3ILi-3G1849718497eucas1p2G;
Mon, 3 Apr 2023 13:22:26 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges2new.samsung.com (EUCPMTA) with SMTP id 3D.F2.09966.213DA246;
Mon, 3
Apr 2023 14:22:26 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p1.samsung.com (KnoxPortal) with ESMTPA id
20230403132226eucas1p182e09f5da7bc0bd284d6a8494cd40903~Sb3HzyLKr0206102061eucas1p1D;
Mon, 3 Apr 2023 13:22:26 +0000 (GMT)
Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20230403132226eusmtrp2a7dbad3b8c19268ae7c0dcce1a593f16~Sb3HyusYY0200802008eusmtrp2Q;
Mon, 3 Apr 2023 13:22:26 +0000 (GMT)
X-AuditID: cbfec7f4-d39ff700000026ee-4b-642ad3126dbf
Received: from eusmtip2.samsung.com ( [203.254.199.222]) by
eusmgms2.samsung.com (EUCPMTA) with SMTP id 08.ED.09583.113DA246;
Mon, 3
Apr 2023 14:22:26 +0100 (BST)
Received: from localhost (unknown [106.210.248.30]) by eusmtip2.samsung.com
(KnoxPortal) with ESMTPA id
20230403132225eusmtip27a6506bf3fe6270d1a4735114f57705d~Sb3HhyA592060320603eusmtip2R;
Mon, 3 Apr 2023 13:22:25 +0000 (GMT)
From: Pankaj Raghav
To: axboe@kernel.dk, minchan@kernel.org, martin@omnibond.com,
hubcap@omnibond.com, brauner@kernel.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, akpm@linux-foundation.org,
willy@infradead.org, hch@lst.de
Cc: devel@lists.orangefs.org, mcgrof@kernel.org,
linux-block@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, gost.dev@samsung.com,
linux-fsdevel@vger.kernel.org, Pankaj Raghav
Subject: [PATCH v2 5/5] filemap: remove page_endio()
Date: Mon, 3 Apr 2023 15:22:21 +0200
Message-Id: <20230403132221.94921-6-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230403132221.94921-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrKKsWRmVeSWpSXmKPExsWy7djP87pCl7VSDPquylrMWb+GzWL13X42
i9eHPzFa7N88hcni5oGdTBYrVx9lsmi/28dksfeWtsWevSdZLC7vmsNmcW/Nf1aLk+v/M1vc
mPCU0WLZ1/fsFp+XtrBb7N64iM3i/N/jrBa/f8xhcxDymN1wkcVj8wotj8tnSz02repk89j0
aRK7x4kZv1k8GqbeYvPYfbOBzePX7TusHn1bVjF6fN4k57HpyVumAJ4oLpuU1JzMstQifbsE
roy33bNYC+bxVay//4GxgfEsdxcjJ4eEgInE3VlvGLsYuTiEBFYwSjQ+XMvexcgB5HxhlOgM
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09f5da7bc0bd284d6a8494cd40903
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230403132226eucas1p182e09f5da7bc0bd284d6a8494cd40903
References: <20230403132221.94921-1-p.raghav@samsung.com>
X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,
RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS
autolearn=unavailable autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
lindbergh.monkeyblade.net
Precedence: bulk
List-ID:
X-Mailing-List: linux-kernel@vger.kernel.org
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
X-GMAIL-THRID: =?utf-8?q?1762162802469530733?=
X-GMAIL-MSGID: =?utf-8?q?1762162802469530733?=
page_endio() is not used anymore. Remove it.
Signed-off-by: Pankaj Raghav
Reviewed-by: Christoph Hellwig
---
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