/* Is io distribute over 1 or more chunks ?  */
static int is_io_in_chunk_boundary(mddev_t *mddev, unsigned int chunk_sects, struct bio *bio)
/* Is io distribute over 1 or more chunks ?  */
static int is_io_in_chunk_boundary(mddev_t *mddev, unsigned int chunk_sects, struct bio *bio)
{
	if (likely(is_power_of_2(chunk_sects))) {
		return chunk_sects >= ((bio->bi_sector & (chunk_sects-1))
					+ (bio->bi_size >> 9));
	} else{
		sector_t sector = bio->bi_sector;
		return chunk_sects >= (sector_div(sector, chunk_sects)
						+ (bio->bi_size >> 9));
	}
}