Lines Matching full:parity
65 wp->parity = NULL; in gv_raid5_start()
96 if (wp->parity != NULL) { in gv_raid5_start()
97 if (wp->parity->bio_cflags & GV_BIO_MALLOC) in gv_raid5_start()
98 g_free(wp->parity->bio_data); in gv_raid5_start()
99 gv_drive_done(wp->parity->bio_caller1); in gv_raid5_start()
100 g_destroy_bio(wp->parity); in gv_raid5_start()
179 struct gv_sd *parity, *s; in gv_raid5_check() local
191 parity = NULL; in gv_raid5_check()
195 parity = s; in gv_raid5_check()
201 /* Parity stripe not found. */ in gv_raid5_check()
202 if (parity == NULL) in gv_raid5_check()
205 if (parity->state != GV_SD_UP) in gv_raid5_check()
214 /* Skip the parity subdisk. */ in gv_raid5_check()
215 if (s == parity) in gv_raid5_check()
233 /* Read the parity data. */ in gv_raid5_check()
234 cbp = gv_raid5_clone_bio(bp, parity, wp, NULL, 1); in gv_raid5_check()
241 * In case we want to rebuild the parity, create an extra BIO to write in gv_raid5_check()
244 cbp = gv_raid5_clone_bio(bp, parity, wp, addr, 1); in gv_raid5_check()
247 wp->parity = cbp; in gv_raid5_check()
328 /* Write the parity data. */ in gv_raid5_rebuild()
332 wp->parity = cbp; in gv_raid5_rebuild()
345 struct gv_sd *broken, *original, *parity, *s; in gv_raid5_request() local
360 original = parity = broken = NULL; in gv_raid5_request()
387 parity = s; in gv_raid5_request()
393 if ((original == NULL) || (parity == NULL)) in gv_raid5_request()
401 if (original->state == GV_SD_STALE && parity->state == GV_SD_STALE && in gv_raid5_request()
404 /* Our parity stripe is missing. */ in gv_raid5_request()
405 } else if (parity->state != GV_SD_UP) { in gv_raid5_request()
432 * the broken one plus the parity stripe and then recalculate in gv_raid5_request()
471 * recalculate the parity from the original data, and then in gv_raid5_request()
472 * write the parity stripe back out. in gv_raid5_request()
477 /* Skip the broken and the parity subdisk. */ in gv_raid5_request()
478 if ((s == broken) || (s == parity)) in gv_raid5_request()
496 /* Write the parity data. */ in gv_raid5_request()
497 cbp = gv_raid5_clone_bio(bp, parity, wp, NULL, 1); in gv_raid5_request()
501 wp->parity = cbp; in gv_raid5_request()
504 * When the parity stripe is missing we just write out the data. in gv_raid5_request()
519 * read in all other stripes, recalculate the parity and write in gv_raid5_request()
520 * out the parity again. in gv_raid5_request()
523 /* Read old parity. */ in gv_raid5_request()
524 cbp = gv_raid5_clone_bio(bp, parity, wp, NULL, 1); in gv_raid5_request()
559 /* The final bio for the parity. */ in gv_raid5_request()
560 cbp = gv_raid5_clone_bio(bp, parity, wp, NULL, 1); in gv_raid5_request()
564 /* Remember that this is the BIO for the parity data. */ in gv_raid5_request()
565 wp->parity = cbp; in gv_raid5_request()
599 /* The number of the subdisk containing the parity stripe. */ in gv_raid5_offset()
612 /* At or past parity subdisk. */ in gv_raid5_offset()