Home
last modified time | relevance | path

Searched refs:raid_disks (Results 1 – 22 of 22) sorted by relevance

/linux-6.1.9/drivers/md/
Dmd-linear.c30 hi = mddev->raid_disks - 1; in which_dev()
49 static sector_t linear_size(struct mddev *mddev, sector_t sectors, int raid_disks) in linear_size() argument
55 WARN_ONCE(sectors || raid_disks, in linear_size()
62 static struct linear_conf *linear_conf(struct mddev *mddev, int raid_disks) in linear_conf() argument
68 conf = kzalloc(struct_size(conf, disks, raid_disks), GFP_KERNEL); in linear_conf()
80 if (j < 0 || j >= raid_disks || disk->rdev) { in linear_conf()
99 if (cnt != raid_disks) { in linear_conf()
110 for (i = 1; i < raid_disks; i++) in linear_conf()
126 conf->raid_disks = raid_disks; in linear_conf()
142 conf = linear_conf(mddev, mddev->raid_disks); in linear_run()
[all …]
Dmd-multipath.c28 int i, disks = conf->raid_disks; in multipath_map()
139 seq_printf (seq, " [%d/%d] [", conf->raid_disks, in multipath_status()
140 conf->raid_disks - mddev->degraded); in multipath_status()
142 for (i = 0; i < conf->raid_disks; i++) { in multipath_status()
157 if (conf->raid_disks - mddev->degraded <= 1) { in multipath_error()
181 conf->raid_disks - mddev->degraded); in multipath_error()
194 pr_debug(" --- wd:%d rd:%d\n", conf->raid_disks - conf->mddev->degraded, in print_multipath_conf()
195 conf->raid_disks); in print_multipath_conf()
197 for (i = 0; i < conf->raid_disks; i++) { in print_multipath_conf()
213 int last = mddev->raid_disks - 1; in multipath_add_disk()
[all …]
Draid1.c133 int size = offsetof(struct r1bio, bios[pi->raid_disks]); in r1bio_pool_alloc()
159 rps = kmalloc_array(pi->raid_disks, sizeof(struct resync_pages), in r1buf_pool_alloc()
167 for (j = pi->raid_disks ; j-- ; ) { in r1buf_pool_alloc()
181 need_pages = pi->raid_disks; in r1buf_pool_alloc()
184 for (j = 0; j < pi->raid_disks; j++) { in r1buf_pool_alloc()
210 while (++j < pi->raid_disks) { in r1buf_pool_alloc()
228 for (i = pi->raid_disks; i--; ) { in r1buf_pool_free()
245 for (i = 0; i < conf->raid_disks * 2; i++) { in put_all_bios()
267 for (i = 0; i < conf->raid_disks * 2; i++) { in put_buf()
353 int raid_disks = conf->raid_disks; in find_bio_disk() local
[all …]
Draid0.c41 int raid_disks = conf->strip_zone[0].nb_dev; in dump_zones() local
51 conf->devlist[j * raid_disks + k]->bdev); in dump_zones()
147 mddev->raid_disks), in create_strip_zones()
182 if (j >= mddev->raid_disks) { in create_strip_zones()
198 if (cnt != mddev->raid_disks) { in create_strip_zones()
200 mdname(mddev), cnt, mddev->raid_disks); in create_strip_zones()
214 dev = conf->devlist + i * mddev->raid_disks; in create_strip_zones()
314 int raid_disks = conf->strip_zone[0].nb_dev; in map_sector() local
337 return conf->devlist[(zone - conf->strip_zone)*raid_disks in map_sector()
341 static sector_t raid0_size(struct mddev *mddev, sector_t sectors, int raid_disks) in raid0_size() argument
[all …]
Ddm-raid.c237 int raid_disks; member
730 mddev->raid_disks = rs->raid_disks; in rs_set_new()
753 rs->raid_disks = raid_devs; in raid_set_alloc()
759 rs->md.raid_disks = raid_devs; in raid_set_alloc()
792 for (i = 0; i < rs->raid_disks; i++) { in raid_set_free()
832 for (i = 0; i < rs->raid_disks; i++) { in parse_dev_params()
1004 unsigned int rebuilds_per_group = 0, copies, raid_disks; in validate_raid_redundancy() local
1007 for (i = 0; i < rs->raid_disks; i++) in validate_raid_redundancy()
1017 if (rebuild_cnt >= rs->md.raid_disks) in validate_raid_redundancy()
1050 raid_disks = min(rs->raid_disks, rs->md.raid_disks); in validate_raid_redundancy()
[all …]
Draid10.c109 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()
[all …]
Draid5.c130 static inline int raid6_next_disk(int disk, int raid_disks) in raid6_next_disk() argument
133 return (disk < raid_disks) ? disk : 0; in raid6_next_disk()
286 else if (injournal == conf->raid_disks - conf->max_degraded) { in do_release_stripe()
590 sh->disks = previous ? conf->previous_raid_disks : conf->raid_disks; in init_stripe()
715 if (conf->raid_disks >= conf->previous_raid_disks) in raid5_calc_degraded()
719 if (conf->raid_disks == conf->previous_raid_disks) in raid5_calc_degraded()
723 for (i = 0; i < conf->raid_disks; i++) { in raid5_calc_degraded()
737 if (conf->raid_disks <= conf->previous_raid_disks) in raid5_calc_degraded()
2424 int devs = max(conf->raid_disks, conf->previous_raid_disks); in grow_stripes()
2670 for (i = conf->raid_disks; i < newsize; i++) { in resize_stripes()
[all …]
Draid1.h65 int raid_disks; member
73 int raid_disks; member
Dmd-autodetect.c183 if (!list_empty(&mddev->disks) || mddev->raid_disks) { in md_setup_drive()
196 while (devices[ainfo.raid_disks]) in md_setup_drive()
197 ainfo.raid_disks++; in md_setup_drive()
Draid5-ppl.c613 int raid_disks = conf->raid_disks; in ppl_do_flush() local
617 atomic_set(&io->pending_flushes, raid_disks); in ppl_do_flush()
619 for_each_set_bit(i, &log->disk_flush_bitmap, raid_disks) { in ppl_do_flush()
647 for (i = flushed_disks ; i < raid_disks; i++) { in ppl_do_flush()
819 data_disks = conf->raid_disks - conf->max_degraded; in ppl_recover_entry()
826 data_disks = conf->raid_disks - conf->max_degraded; in ppl_recover_entry()
1358 if (conf->raid_disks > max_disks) { in ppl_init_log()
1376 ret = mempool_init(&ppl_conf->io_pool, conf->raid_disks, ppl_io_pool_alloc, in ppl_init_log()
1381 ret = bioset_init(&ppl_conf->bs, conf->raid_disks, 0, BIOSET_NEED_BVECS); in ppl_init_log()
1385 ret = bioset_init(&ppl_conf->flush_bs, conf->raid_disks, 0, 0); in ppl_init_log()
[all …]
Dmd.c645 if (!mddev->raid_disks && list_empty(&mddev->disks) && in mddev_put()
1193 if (sb->raid_disks <= 0) in super_90_load()
1277 if (mddev->raid_disks == 0) { in super_90_validate()
1288 mddev->raid_disks = sb->raid_disks; in super_90_validate()
1398 int next_spare = mddev->raid_disks; in super_90_sync()
1431 sb->raid_disks = mddev->raid_disks; in super_90_sync()
1515 for (i=0 ; i < mddev->raid_disks ; i++) { in super_90_sync()
1788 if (mddev->raid_disks == 0) { in super_1_validate()
1798 mddev->raid_disks = le32_to_cpu(sb->raid_disks); in super_1_validate()
1975 sb->raid_disks = cpu_to_le32(mddev->raid_disks); in super_1_sync()
[all …]
Dmd-linear.h14 int raid_disks; /* a copy of mddev->raid_disks */ member
Dmd-multipath.h12 int raid_disks; member
Draid10.h36 int raid_disks; member
Dmd-faulty.c283 static sector_t faulty_size(struct mddev *mddev, sector_t sectors, int raid_disks) in faulty_size() argument
285 WARN_ONCE(raid_disks, in faulty_size()
Dmd.h343 int raid_disks; member
612 sector_t (*size) (struct mddev *mddev, sector_t sectors, int raid_disks);
Draid5.h582 int raid_disks; member
Draid5-cache.c406 (conf->raid_disks - conf->max_degraded) * (conf->group_cnt + 1)); in r5c_log_required_to_flush_cache()
3083 conf->raid_disks) > PAGE_SIZE) { in r5l_init_log()
3085 mdname(conf->mddev), conf->raid_disks); in r5l_init_log()
/linux-6.1.9/include/uapi/linux/raid/
Dmd_p.h149 __u32 raid_disks; /* 10 disks in a fully functional raid set */ member
245 __le32 raid_disks; member
Dmd_u.h88 int raid_disks; member
/linux-6.1.9/Documentation/admin-guide/device-mapper/
Ddm-ima.rst574 …target_attributes := <target_name> "," <target_version> "," <raid_type> "," <raid_disks> "," <raid…
580 raid_disks := "raid_disks=" <NRD>
584 … <raid_device_status_row> is repeated <NRD> times - for <NRD> described in <raid_disks>.
586 … where <X> ranges from 0 to (<NRD> -1) - for <NRD> described in <raid_disks>.
600 raid_type=raid10,raid_disks=4,raid_state=idle,
/linux-6.1.9/Documentation/admin-guide/
Dmd.rst170 ``raid_disks != 0``.
201 raid_disks
244 attributes mentioned above (raid_disks, chunk_size, layout) can
546 ``raid_disks`` number for the array indicating which position