Lines Matching refs:near_copies
35 * near_copies (stored in low byte of layout)
42 * near_copies copies of each chunk is stored (each on a different drive).
43 * The starting device for each section is offset near_copies from the starting
45 * Thus they are (near_copies*far_copies) of each chunk, and each is on a different
47 * near_copies and far_copies must be at least one, and their product is at most
353 * parameters: near_copies and far_copies.
354 * near_copies * far_copies must be <= raid_disks.
357 * If near_copies == raid_disks, we get raid1.
359 * Chunks are layed out in raid0 style with near_copies copies of the
360 * first chunk, followed by near_copies copies of the next chunk and
363 * as described above, we start again with a device offset of near_copies.
389 chunk *= conf->near_copies;
398 for (n=0; n < conf->near_copies; n++) {
406 d += conf->near_copies;
432 dev -= fc * conf->near_copies;
438 if (dev < conf->near_copies)
439 dev += conf->raid_disks - conf->near_copies;
441 dev -= conf->near_copies;
446 sector_div(vchunk, conf->near_copies);
457 * If near_copies == raid_disk, there are no striping issues,
564 if (conf->near_copies > 1 && !atomic_read(&rdev->nr_pending)) {
813 conf->near_copies < conf->raid_disks)) {
998 if (conf->near_copies < conf->raid_disks)
1000 if (conf->near_copies > 1)
1001 seq_printf(seq, " %d near-copies", conf->near_copies);
1873 if (conf->near_copies < conf->raid_disks &&
2168 sector_div(size, conf->near_copies);
2216 conf->near_copies = nc;
2308 if (conf->raid_disks % conf->near_copies)
2312 (conf->raid_disks / conf->near_copies));
2384 stripe /= conf->near_copies;
2389 if (conf->near_copies < conf->raid_disks)
2451 /* new layout: far_copies = 1, near_copies = 2 */