From: Coly Li <colyli@suse.de> To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk> Cc: Ming Lei <ming.lei@redhat.com>, Boaz Harrosh <ooo@electrozaur.com>, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, dm-devel@redhat.com Subject: Re: [PATCH 2/6] bcache: don't clone bio in bch_data_verify Date: Tue, 19 Jun 2018 15:41:43 +0800 [thread overview] Message-ID: <16f9edb8-1884-ef00-b913-f88db1b80695@suse.de> (raw) In-Reply-To: <20180619045216.21130-3-hch@lst.de> On 2018/6/19 12:52 PM, Christoph Hellwig wrote: > We immediately overwrite the biovec array, so instead just allocate > a new bio and copy over the disk, setor and size. > > Signed-off-by: Christoph Hellwig <hch@lst.de> It looks good to me. Acked-by: Coly Li <colyli@suse.de> Thanks. Coly Li > --- > drivers/md/bcache/debug.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c > index d030ce3025a6..04d146711950 100644 > --- a/drivers/md/bcache/debug.c > +++ b/drivers/md/bcache/debug.c > @@ -110,11 +110,15 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio) > struct bio_vec bv, cbv; > struct bvec_iter iter, citer = { 0 }; > > - check = bio_clone_kmalloc(bio, GFP_NOIO); > + check = bio_kmalloc(GFP_NOIO, bio_segments(bio)); > if (!check) > return; > + check->bi_disk = bio->bi_disk; > check->bi_opf = REQ_OP_READ; > + check->bi_iter.bi_sector = bio->bi_iter.bi_sector; > + check->bi_iter.bi_size = bio->bi_iter.bi_size; > > + bch_bio_map(check, NULL); > if (bch_bio_alloc_pages(check, GFP_NOIO)) > goto out_put; > >
WARNING: multiple messages have this Message-ID (diff)
From: Coly Li <colyli@suse.de> To: Christoph Hellwig <hch@lst.de>, 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, Ming Lei <ming.lei@redhat.com> Subject: Re: [PATCH 2/6] bcache: don't clone bio in bch_data_verify Date: Tue, 19 Jun 2018 15:41:43 +0800 [thread overview] Message-ID: <16f9edb8-1884-ef00-b913-f88db1b80695@suse.de> (raw) In-Reply-To: <20180619045216.21130-3-hch@lst.de> On 2018/6/19 12:52 PM, Christoph Hellwig wrote: > We immediately overwrite the biovec array, so instead just allocate > a new bio and copy over the disk, setor and size. > > Signed-off-by: Christoph Hellwig <hch@lst.de> It looks good to me. Acked-by: Coly Li <colyli@suse.de> Thanks. Coly Li > --- > drivers/md/bcache/debug.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c > index d030ce3025a6..04d146711950 100644 > --- a/drivers/md/bcache/debug.c > +++ b/drivers/md/bcache/debug.c > @@ -110,11 +110,15 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio) > struct bio_vec bv, cbv; > struct bvec_iter iter, citer = { 0 }; > > - check = bio_clone_kmalloc(bio, GFP_NOIO); > + check = bio_kmalloc(GFP_NOIO, bio_segments(bio)); > if (!check) > return; > + check->bi_disk = bio->bi_disk; > check->bi_opf = REQ_OP_READ; > + check->bi_iter.bi_sector = bio->bi_iter.bi_sector; > + check->bi_iter.bi_size = bio->bi_iter.bi_size; > > + bch_bio_map(check, NULL); > if (bch_bio_alloc_pages(check, GFP_NOIO)) > goto out_put; > >
next prev parent reply other threads:[~2018-06-19 7:41 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-19 4:52 [RFC] kill bio_clone_kmalloc and bio_clone_bioset Christoph Hellwig 2018-06-19 4:52 ` Christoph Hellwig 2018-06-19 4:52 ` [PATCH 1/6] dm: use bio_split() when splitting out the already processed bio Christoph Hellwig 2018-06-19 4:52 ` [PATCH 2/6] bcache: don't clone bio in bch_data_verify Christoph Hellwig 2018-06-19 4:52 ` Christoph Hellwig 2018-06-19 7:41 ` Coly Li [this message] 2018-06-19 7:41 ` Coly Li 2018-06-19 4:52 ` [PATCH 3/6] exofs: use bio_clone_fast in _write_mirror Christoph Hellwig 2018-06-19 4:52 ` Christoph Hellwig 2018-06-19 7:54 ` Boaz Harrosh 2018-06-19 7:54 ` Boaz Harrosh 2018-06-19 4:52 ` [PATCH 4/6] block: remove bio_clone_kmalloc Christoph Hellwig 2018-06-19 4:52 ` Christoph Hellwig 2018-06-19 4:52 ` [PATCH 5/6] md: remove a bogus comment Christoph Hellwig 2018-06-19 4:52 ` Christoph Hellwig 2018-06-19 4:52 ` [PATCH 6/6] block: unexport bio_clone_bioset Christoph Hellwig 2018-06-19 4:52 ` Christoph Hellwig 2018-06-20 9:12 ` [RFC] kill bio_clone_kmalloc and bio_clone_bioset Ming Lei 2018-06-20 9:12 ` Ming Lei
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=16f9edb8-1884-ef00-b913-f88db1b80695@suse.de \ --to=colyli@suse.de \ --cc=axboe@kernel.dk \ --cc=dm-devel@redhat.com \ --cc=hch@lst.de \ --cc=linux-bcache@vger.kernel.org \ --cc=linux-block@vger.kernel.org \ --cc=ming.lei@redhat.com \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.