From: chenlei0x@gmail.com
To: hch@infradead.org, darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, Lei Chen <lennychen@tencent.com>
Subject: [PATCH] fs: iomap: Replace bio_add_page with __bio_add_page in iomap_add_to_ioend
Date: Mon, 30 Nov 2020 15:28:51 +0800 [thread overview]
Message-ID: <1606721331-4211-1-git-send-email-lennychen@tencent.com> (raw)
From: Lei Chen <lennychen@tencent.com>
iomap_add_to_ioend append page on wpc->ioend->io_bio. If io_bio is full,
iomap_chain_bio will allocate a new bio. So when bio_add_page is called,
pages is guaranteed to be appended into wpc->ioend->io_bio. So we do not
need to check if page can be merged. Thus it's a faster way to directly
call __bio_add_page.
Signed-off-by: Lei Chen <lennychen@tencent.com>
---
fs/iomap/buffered-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 10cc797..7a0631a 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1310,7 +1310,7 @@ static void iomap_writepage_end_bio(struct bio *bio)
wpc->ioend->io_bio =
iomap_chain_bio(wpc->ioend->io_bio);
}
- bio_add_page(wpc->ioend->io_bio, page, len, poff);
+ __bio_add_page(wpc->ioend->io_bio, page, len, poff);
}
wpc->ioend->io_size += len;
--
1.8.3.1
next reply other threads:[~2020-11-30 7:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 7:28 chenlei0x [this message]
2020-11-30 17:22 ` [PATCH] fs: iomap: Replace bio_add_page with __bio_add_page in iomap_add_to_ioend Darrick J. Wong
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=1606721331-4211-1-git-send-email-lennychen@tencent.com \
--to=chenlei0x@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=lennychen@tencent.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).