/* Clone a &bio. Caller will own the returned bio, but not the actual data it points to. Reference count of returned bio will be one.  */
void __bio_clone(struct bio *bio, struct bio *bio_src)
/* Clone a &bio. Caller will own the returned bio, but not the actual data it points to. Reference count of returned bio will be one.  */
void __bio_clone(struct bio *bio, struct bio *bio_src)
{
	memcpy(bio->bi_io_vec, bio_src->bi_io_vec,
		bio_src->bi_max_vecs * sizeof(struct bio_vec));
	bio->bi_sector = bio_src->bi_sector;
	bio->bi_bdev = bio_src->bi_bdev;
	bio->bi_flags |= 1 << BIO_CLONED;
	bio->bi_rw = bio_src->bi_rw;
	bio->bi_vcnt = bio_src->bi_vcnt;
	bio->bi_size = bio_src->bi_size;
	bio->bi_idx = bio_src->bi_idx;
}