From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Boaz Harrosh <ooo@electrozaur.com>,
linux-bcache@vger.kernel.org, dm-devel@redhat.com
Subject: [PATCH 2/5] exofs: use bio_clone_fast in _write_mirror
Date: Tue, 24 Jul 2018 09:52:31 +0200 [thread overview]
Message-ID: <20180724075234.26861-3-hch@lst.de> (raw)
In-Reply-To: <20180724075234.26861-1-hch@lst.de>
The mirroring code never changes the bio data or biovecs. This means
we can reuse the biovec allocation easily instead of duplicating it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by Boaz Harrosh <ooo@electrozaur.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
---
fs/exofs/ore.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c
index 1b8b44637e70..5331a15a61f1 100644
--- a/fs/exofs/ore.c
+++ b/fs/exofs/ore.c
@@ -873,8 +873,8 @@ static int _write_mirror(struct ore_io_state *ios, int cur_comp)
struct bio *bio;
if (per_dev != master_dev) {
- bio = bio_clone_kmalloc(master_dev->bio,
- GFP_KERNEL);
+ bio = bio_clone_fast(master_dev->bio,
+ GFP_KERNEL, NULL);
if (unlikely(!bio)) {
ORE_DBGMSG(
"Failed to allocate BIO size=%u\n",
--
2.18.0
next prev parent reply other threads:[~2018-07-24 7:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-24 7:52 kill bio_clone_kmalloc and bio_clone_bioset Christoph Hellwig
2018-07-24 7:52 ` [PATCH 1/5] bcache: don't clone bio in bch_data_verify Christoph Hellwig
2018-07-24 7:52 ` Christoph Hellwig [this message]
2018-07-24 7:52 ` [PATCH 3/5] block: remove bio_clone_kmalloc Christoph Hellwig
2018-07-24 7:52 ` [PATCH 4/5] md: remove a bogus comment Christoph Hellwig
2018-07-24 7:52 ` [PATCH 5/5] block: unexport bio_clone_bioset Christoph Hellwig
2018-07-24 20:43 ` kill bio_clone_kmalloc and bio_clone_bioset Jens Axboe
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=20180724075234.26861-3-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=ooo@electrozaur.com \
/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).