bp = bio_split(bio, bio_split_pool, (bio->bi_sector + (bio->bi_size >> 9) - (tmp_dev->offset + tmp_dev->size))<<1); 
bp = bio_split(bio, bio_split_pool, ((tmp_dev->offset + tmp_dev->size)<<1) - bio->bi_sector); 
static int linear_make_request (request_queue_t *q, struct bio *bio){	mddev_t *mddev = q->queuedata;	dev_info_t *tmp_dev;	sector_t block;	if (bio_data_dir(bio)==WRITE) {		disk_stat_inc(mddev->gendisk, writes);		disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bio));	} else {		disk_stat_inc(mddev->gendisk, reads);		disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bio));	}	tmp_dev = which_dev(mddev, bio->bi_sector);	block = bio->bi_sector >> 1;    	if (unlikely(block >= (tmp_dev->size + tmp_dev->offset)		     || block < tmp_dev->offset)) {		char b[BDEVNAME_SIZE];		printk("linear_make_request: Block %llu out of bounds on "			"dev %s size %llu offset %llu\n",			(unsigned long long)block,			bdevname(tmp_dev->rdev->bdev, b),			(unsigned long long)tmp_dev->size,		        (unsigned long long)tmp_dev->offset);		bio_io_error(bio, bio->bi_size);		return 0;	}	if (unlikely(bio->bi_sector + (bio->bi_size >> 9) >		     (tmp_dev->offset + tmp_dev->size)<<1)) {		/* This bio crosses a device boundary, so we have to		 * split it.		 */		struct bio_pair *bp;		bp = bio_split(bio, bio_split_pool, 			       (bio->bi_sector + (bio->bi_size >> 9) -				(tmp_dev->offset + tmp_dev->size))<<1);		if (linear_make_request(q, &bp->bio1))			generic_make_request(&bp->bio1);		if (linear_make_request(q, &bp->bio2))			generic_make_request(&bp->bio2);		bio_pair_release(bp);		return 0;	}		    	bio->bi_bdev = tmp_dev->rdev->bdev;	bio->bi_sector = bio->bi_sector - (tmp_dev->offset << 1) + tmp_dev->rdev->data_offset;	return 1;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/29ac8e056f2016a8404edc02749d095019aa1f82/linear.c/buggy/drivers/md/linear.c