Lines Matching refs:chunk_sects
427 unsigned int chunk_sects = mddev->chunk_sectors; in map_sector() local
429 if (is_power_of_2(chunk_sects)) { in map_sector()
430 int chunksect_bits = ffz(~chunk_sects); in map_sector()
432 sect_in_chunk = sector & (chunk_sects - 1); in map_sector()
439 sect_in_chunk = sector_div(sector, chunk_sects); in map_sector()
441 sector_div(chunk, chunk_sects * zone->nb_dev); in map_sector()
448 *sector_offset = (chunk * chunk_sects) + sect_in_chunk; in map_sector()
457 unsigned int chunk_sects, struct bio *bio) in is_io_in_chunk_boundary() argument
459 if (likely(is_power_of_2(chunk_sects))) { in is_io_in_chunk_boundary()
460 return chunk_sects >= ((bio->bi_sector & (chunk_sects-1)) in is_io_in_chunk_boundary()
464 return chunk_sects >= (sector_div(sector, chunk_sects) in is_io_in_chunk_boundary()
471 unsigned int chunk_sects; in raid0_make_request() local
481 chunk_sects = mddev->chunk_sectors; in raid0_make_request()
482 if (unlikely(!is_io_in_chunk_boundary(mddev, chunk_sects, bio))) { in raid0_make_request()
492 if (likely(is_power_of_2(chunk_sects))) in raid0_make_request()
493 bp = bio_split(bio, chunk_sects - (sector & in raid0_make_request()
494 (chunk_sects-1))); in raid0_make_request()
496 bp = bio_split(bio, chunk_sects - in raid0_make_request()
497 sector_div(sector, chunk_sects)); in raid0_make_request()
522 mdname(mddev), chunk_sects / 2, in raid0_make_request()