From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: linux-erofs@lists.ozlabs.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Gao Xiang <hsiangkao@linux.alibaba.com>
Subject: [PATCH 5/6] erofs: convert z_erofs_submissionqueue_endio() to folios
Date: Tue, 5 Mar 2024 17:14:47 +0800 [thread overview]
Message-ID: <20240305091448.1384242-5-hsiangkao@linux.alibaba.com> (raw)
In-Reply-To: <20240305091448.1384242-1-hsiangkao@linux.alibaba.com>
Use bio_for_each_folio() to iterate over each folio in the bio and
there is no large folios for now.
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
fs/erofs/zdata.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index d78cc54a96f5..63990c8192f2 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -1566,19 +1566,19 @@ static void z_erofs_submissionqueue_endio(struct bio *bio)
{
struct z_erofs_decompressqueue *q = bio->bi_private;
blk_status_t err = bio->bi_status;
- struct bio_vec *bvec;
- struct bvec_iter_all iter_all;
+ struct folio_iter fi;
- bio_for_each_segment_all(bvec, bio, iter_all) {
- struct page *page = bvec->bv_page;
+ bio_for_each_folio_all(fi, bio) {
+ struct folio *folio = fi.folio;
- DBG_BUGON(PageUptodate(page));
- DBG_BUGON(z_erofs_page_is_invalidated(page));
- if (erofs_page_is_managed(EROFS_SB(q->sb), page)) {
- if (!err)
- SetPageUptodate(page);
- unlock_page(page);
- }
+ DBG_BUGON(folio_test_uptodate(folio));
+ DBG_BUGON(z_erofs_page_is_invalidated(&folio->page));
+ if (!erofs_page_is_managed(EROFS_SB(q->sb), &folio->page))
+ continue;
+
+ if (!err)
+ folio_mark_uptodate(folio);
+ folio_unlock(folio);
}
if (err)
q->eio = true;
--
2.39.3
next prev parent reply other threads:[~2024-03-05 9:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 9:14 [PATCH 1/6] erofs: convert z_erofs_onlinepage_.* " Gao Xiang
2024-03-05 9:14 ` [PATCH 2/6] erofs: convert z_erofs_do_read_page() " Gao Xiang
2024-03-10 1:04 ` Chao Yu
2024-03-05 9:14 ` [PATCH 3/6] erofs: get rid of `justfound` debugging tag Gao Xiang
2024-03-10 1:05 ` Chao Yu
2024-03-05 9:14 ` [PATCH 4/6] erofs: convert z_erofs_fill_bio_vec() to folios Gao Xiang
2024-03-10 1:07 ` Chao Yu
2024-03-05 9:14 ` Gao Xiang [this message]
2024-03-10 1:07 ` [PATCH 5/6] erofs: convert z_erofs_submissionqueue_endio() " Chao Yu
2024-03-05 9:14 ` [PATCH 6/6] erofs: refine managed cache operations " Gao Xiang
2024-03-10 1:09 ` Chao Yu
2024-03-10 1:03 ` [PATCH 1/6] erofs: convert z_erofs_onlinepage_.* " Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240305091448.1384242-5-hsiangkao@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®