Lines Matching refs:raid_disks

109 	int size = offsetof(struct r10bio, devs[conf->geo.raid_disks]);  in r10bio_pool_alloc()
263 for (i = 0; i < conf->geo.raid_disks; i++) { in put_all_bios()
360 for (slot = 0; slot < conf->geo.raid_disks; slot++) { in find_bio_disk()
599 last_far_set_start = (geo->raid_disks / geo->far_set_size) - 1; in __raid10_find_phys()
603 last_far_set_size += (geo->raid_disks % geo->far_set_size); in __raid10_find_phys()
611 dev = sector_div(stripe, geo->raid_disks); in __raid10_find_phys()
630 if ((geo->raid_disks % geo->far_set_size) && in __raid10_find_phys()
645 if (dev >= geo->raid_disks) { in __raid10_find_phys()
678 if (geo->raid_disks % geo->far_set_size) { in raid10_find_virt()
679 last_far_set_start = (geo->raid_disks / geo->far_set_size) - 1; in raid10_find_virt()
684 far_set_size += (geo->raid_disks % geo->far_set_size); in raid10_find_virt()
707 vchunk = chunk * geo->raid_disks + dev; in raid10_find_virt()
1578 conf->geo.raid_disks); in __make_request()
1683 stripe_data_disks = geo->raid_disks / geo->near_copies + in raid10_handle_discard()
1684 geo->raid_disks % geo->near_copies; in raid10_handle_discard()
1686 stripe_data_disks = geo->raid_disks; in raid10_handle_discard()
1740 start_disk_index = sector_div(first_stripe_index, geo->raid_disks); in raid10_handle_discard()
1749 end_disk_index = sector_div(last_stripe_index, geo->raid_disks); in raid10_handle_discard()
1760 memset(r10_bio->devs, 0, sizeof(r10_bio->devs[0]) * geo->raid_disks); in raid10_handle_discard()
1784 for (disk = 0; disk < geo->raid_disks; disk++) { in raid10_handle_discard()
1811 for (disk = 0; disk < geo->raid_disks; disk++) { in raid10_handle_discard()
1920 && (conf->geo.near_copies < conf->geo.raid_disks in raid10_make_request()
1922 conf->prev.raid_disks))) in raid10_make_request()
1938 if (conf->geo.near_copies < conf->geo.raid_disks) in raid10_status()
1947 if (conf->geo.far_set_size != conf->geo.raid_disks) in raid10_status()
1950 seq_printf(seq, " [%d/%d] [", conf->geo.raid_disks, in raid10_status()
1951 conf->geo.raid_disks - mddev->degraded); in raid10_status()
1953 for (i = 0; i < conf->geo.raid_disks; i++) { in raid10_status()
1972 disks = conf->prev.raid_disks; in _enough()
1975 disks = conf->geo.raid_disks; in _enough()
2055 mdname(mddev), conf->geo.raid_disks - mddev->degraded); in raid10_error()
2068 pr_debug(" --- wd:%d rd:%d\n", conf->geo.raid_disks - conf->mddev->degraded, in print_conf()
2069 conf->geo.raid_disks); in print_conf()
2073 for (i = 0; i < conf->geo.raid_disks; i++) { in print_conf()
2103 for (i = 0; i < conf->geo.raid_disks; i++) { in raid10_spare_active()
2145 int last = conf->geo.raid_disks - 1; in raid10_add_disk()
2162 rdev->saved_raid_disk < conf->geo.raid_disks && in raid10_add_disk()
2214 if (unlikely(number >= mddev->raid_disks)) in raid10_remove_disk()
2235 number < conf->geo.raid_disks && in raid10_remove_disk()
3168 for (i = 0; i < conf->geo.raid_disks; i++) in init_resync()
3229 chunks = conf->geo.raid_disks / conf->geo.near_copies; in raid10_set_cluster_sync_high()
3230 if (conf->geo.raid_disks % conf->geo.near_copies == 0) in raid10_set_cluster_sync_high()
3339 else for (i = 0; i < conf->geo.raid_disks; i++) { in raid10_sync_request()
3354 for (i = 0; i < conf->geo.raid_disks; i++) { in raid10_sync_request()
3373 if (chunks_skipped >= conf->geo.raid_disks) { in raid10_sync_request()
3387 if (conf->geo.near_copies < conf->geo.raid_disks && in raid10_sync_request()
3419 for (i = 0 ; i < conf->geo.raid_disks; i++) { in raid10_sync_request()
3501 for (j = 0; j < conf->geo.raid_disks; j++) { in raid10_sync_request()
3834 for (i = 0; i < conf->geo.raid_disks; i++) { in raid10_sync_request()
3901 raid10_size(struct mddev *mddev, sector_t sectors, int raid_disks) in raid10_size() argument
3906 if (!raid_disks) in raid10_size()
3907 raid_disks = min(conf->geo.raid_disks, in raid10_size()
3908 conf->prev.raid_disks); in raid10_size()
3914 size = size * raid_disks; in raid10_size()
3929 size = size * conf->geo.raid_disks; in calc_sectors()
3938 size = DIV_ROUND_UP_SECTOR_T(size, conf->geo.raid_disks); in calc_sectors()
3959 disks = mddev->raid_disks - mddev->delta_disks; in setup_geo()
3964 disks = mddev->raid_disks; in setup_geo()
3971 disks = mddev->raid_disks + mddev->delta_disks; in setup_geo()
3982 geo->raid_disks = disks; in setup_geo()
4022 if (copies < 2 || copies > mddev->raid_disks) { in setup_conf()
4034 conf->mirrors = kcalloc(mddev->raid_disks + max(0, -mddev->delta_disks), in setup_conf()
4101 int raid_disks = conf->geo.raid_disks; in raid10_set_io_opt() local
4103 if (!(conf->geo.raid_disks % conf->geo.near_copies)) in raid10_set_io_opt()
4104 raid_disks /= conf->geo.near_copies; in raid10_set_io_opt()
4106 raid_disks); in raid10_set_io_opt()
4159 if (disk_idx >= conf->geo.raid_disks && in raid10_run()
4160 disk_idx >= conf->prev.raid_disks) in raid10_run()
4208 i < conf->geo.raid_disks in raid10_run()
4209 || i < conf->prev.raid_disks; in raid10_run()
4243 mdname(mddev), conf->geo.raid_disks - mddev->degraded, in raid10_run()
4244 conf->geo.raid_disks); in raid10_run()
4380 mddev->delta_disks = mddev->raid_disks; in raid10_takeover_raid0()
4381 mddev->raid_disks *= 2; in raid10_takeover_raid0()
4462 kcalloc(mddev->raid_disks + mddev->delta_disks, in raid10_check_reshape()
4492 for (i = 0; i < conf->prev.raid_disks; i++) { in calc_degraded()
4504 if (conf->geo.raid_disks == conf->prev.raid_disks) in calc_degraded()
4508 for (i = 0; i < conf->geo.raid_disks; i++) { in calc_degraded()
4518 if (conf->geo.raid_disks <= conf->prev.raid_disks) in calc_degraded()
4587 sizeof(struct raid10_info)*conf->prev.raid_disks); in raid10_start_reshape()
4616 newsize = raid10_size(mddev, 0, conf->geo.raid_disks); in raid10_start_reshape()
4658 conf->prev.raid_disks) in raid10_start_reshape()
4666 } else if (rdev->raid_disk >= conf->prev.raid_disks in raid10_start_reshape()
4679 mddev->raid_disks = conf->geo.raid_disks; in raid10_start_reshape()
4704 mddev->raid_disks = conf->geo.raid_disks; in raid10_start_reshape()
4726 s = DIV_ROUND_UP_SECTOR_T(s, geo->raid_disks); in last_dev_address()
4740 sector_div(s, geo->raid_disks); in first_dev_address()
5230 for (d = conf->geo.raid_disks ; in raid10_finish_reshape()
5231 d < conf->geo.raid_disks - mddev->delta_disks; in raid10_finish_reshape()