bio->bi_destructor = dm_bio_destructor; 
static void do_region(int rw, unsigned int region, struct io_region *where,		      struct dpages *dp, struct io *io){	struct bio *bio;	struct page *page;	unsigned long len;	unsigned offset;	unsigned num_bvecs;	sector_t remaining = where->count;	while (remaining) {		/*		 * Allocate a suitably sized bio, we add an extra		 * bvec for bio_get/set_region().		 */		num_bvecs = (remaining / (PAGE_SIZE >> 9)) + 2;		bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, _bios);		bio->bi_sector = where->sector + (where->count - remaining);		bio->bi_bdev = where->bdev;		bio->bi_end_io = endio;		bio->bi_private = io;		bio_set_region(bio, region);		/*		 * Try and add as many pages as possible.		 */		while (remaining) {			dp->get_page(dp, &page, &len, &offset);			len = min(len, to_bytes(remaining));			if (!bio_add_page(bio, page, len, offset))				break;			offset = 0;			remaining -= to_sector(len);			dp->next_page(dp);		}		atomic_inc(&io->count);		submit_bio(rw, bio);	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3676347a5e216a7fec7f8eedbbcf8bed6b9c4e40/dm-io.c/buggy/drivers/md/dm-io.c