From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivek Goyal Subject: Re: [PATCH v2 03/14] block: Add bio_clone_bioset() Date: Thu, 24 May 2012 14:45:07 -0400 Message-ID: <20120524184507.GD27550@redhat.com> References: <1337817771-25038-1-git-send-email-koverstreet@google.com> <1337817771-25038-4-git-send-email-koverstreet@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, neilb-l3A5Bk7waGM@public.gmane.org, drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org, bharrosh-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org, mpatocka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org, yehuda-L5o5AL9CYN0tUFlbccrkMA@public.gmane.org To: Kent Overstreet Return-path: Content-Disposition: inline In-Reply-To: <1337817771-25038-4-git-send-email-koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> Sender: linux-bcache-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Wed, May 23, 2012 at 05:02:40PM -0700, Kent Overstreet wrote: [..] > --- a/drivers/md/dm.c > +++ b/drivers/md/dm.c > @@ -1062,26 +1062,19 @@ static struct bio *split_bvec(struct bio *bio, sector_t sector, > * Creates a bio that consists of range of complete bvecs. > */ > static struct bio *clone_bio(struct bio *bio, sector_t sector, > - unsigned short idx, unsigned short bv_count, > + unsigned short bv_count, > unsigned int len, struct bio_set *bs) > { > struct bio *clone; > > - clone = bio_alloc_bioset(GFP_NOIO, bio->bi_max_vecs, bs); > - __bio_clone(clone, bio); > + clone = bio_clone_bioset(bio, GFP_NOIO, bs); > clone->bi_sector = sector; > - clone->bi_idx = idx; > - clone->bi_vcnt = idx + bv_count; > + clone->bi_vcnt = bv_count; In last posting you said that you are going to backout this idx change because you were not sure if it is correct. Thanks Vivek