• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/geom/raid/

Lines Matching defs:trs

180 	struct g_raid_tr_raid1e_object *trs;
182 trs = (struct g_raid_tr_raid1e_object *)tr;
186 trs->trso_starting = 1;
301 struct g_raid_tr_raid1e_object *trs;
306 trs = (struct g_raid_tr_raid1e_object *)vol->v_tr;
307 if (trs->trso_stopping &&
308 (trs->trso_flags & TR_RAID1E_F_DOING_SOME) == 0)
310 else if (trs->trso_starting)
323 if (!trs->trso_starting && !trs->trso_stopping)
326 if (!trs->trso_starting && !trs->trso_stopping)
358 g_raid_tr_raid1e_rebuild_done(struct g_raid_tr_raid1e_object *trs)
363 vol = trs->trso_base.tro_volume;
364 sd = trs->trso_failed_sd;
366 free(trs->trso_buffer, M_TR_RAID1E);
367 trs->trso_buffer = NULL;
368 trs->trso_flags &= ~TR_RAID1E_F_DOING_SOME;
369 trs->trso_type = TR_RAID1E_NONE;
370 trs->trso_recover_slabs = 0;
371 trs->trso_failed_sd = NULL;
378 struct g_raid_tr_raid1e_object *trs;
381 trs = (struct g_raid_tr_raid1e_object *)tr;
382 sd = trs->trso_failed_sd;
389 g_raid_tr_raid1e_rebuild_done(trs);
395 struct g_raid_tr_raid1e_object *trs;
400 trs = (struct g_raid_tr_raid1e_object *)tr;
401 sd = trs->trso_failed_sd;
402 if (trs->trso_flags & TR_RAID1E_F_DOING_SOME) {
407 trs->trso_flags |= TR_RAID1E_F_ABORT;
413 trs->trso_flags &= ~TR_RAID1E_F_ABORT;
414 if (trs->trso_flags & TR_RAID1E_F_LOCKED) {
415 trs->trso_flags &= ~TR_RAID1E_F_LOCKED;
417 trs->trso_lock_pos, trs->trso_lock_len);
419 g_raid_tr_raid1e_rebuild_done(trs);
426 struct g_raid_tr_raid1e_object *trs;
434 trs = (struct g_raid_tr_raid1e_object *)tr;
435 if (trs->trso_flags & TR_RAID1E_F_DOING_SOME)
439 sd = trs->trso_failed_sd;
472 bp = &trs->trso_bio;
477 bp->bio_data = trs->trso_buffer;
490 trs->trso_flags |= TR_RAID1E_F_DOING_SOME;
491 trs->trso_flags |= TR_RAID1E_F_LOCKED;
492 trs->trso_lock_pos = virtual;
493 trs->trso_lock_len = len;
502 struct g_raid_tr_raid1e_object *trs;
506 trs = (struct g_raid_tr_raid1e_object *)tr;
507 if (trs->trso_failed_sd) {
510 (intmax_t)trs->trso_failed_sd->sd_rebuild_pos);
543 trs->trso_failed_sd = sd;
548 trs->trso_failed_sd->sd_rebuild_pos);
549 trs->trso_type = TR_RAID1E_REBUILD;
550 trs->trso_buffer = malloc(g_raid1e_rebuild_slab, M_TR_RAID1E, M_WAITOK);
551 trs->trso_meta_update = g_raid1e_rebuild_meta_update;
560 struct g_raid_tr_raid1e_object *trs;
564 trs = (struct g_raid_tr_raid1e_object *)tr;
565 if (trs->trso_stopping)
569 switch(trs->trso_type) {
584 trs->trso_failed_sd == sd)
604 struct g_raid_tr_raid1e_object *trs;
607 trs = (struct g_raid_tr_raid1e_object *)tr;
609 trs->trso_starting = 0;
617 struct g_raid_tr_raid1e_object *trs;
620 trs = (struct g_raid_tr_raid1e_object *)tr;
622 trs->trso_starting = 0;
623 trs->trso_stopping = 1;
838 struct g_raid_tr_raid1e_object *trs;
841 trs = (struct g_raid_tr_raid1e_object *)tr;
854 if (trs->trso_failed_sd != NULL &&
857 trs->trso_recover_slabs = 0;
858 if (--trs->trso_fair_io <= 0) {
859 trs->trso_fair_io = g_raid1e_rebuild_fair_io;
889 struct g_raid_tr_raid1e_object *trs;
894 trs = (struct g_raid_tr_raid1e_object *)tr;
897 if (trs->trso_type == TR_RAID1E_REBUILD) {
898 nsd = trs->trso_failed_sd;
902 if (trs->trso_flags & TR_RAID1E_F_ABORT) {
903 trs->trso_flags &= ~TR_RAID1E_F_DOING_SOME;
938 trs->trso_flags & TR_RAID1E_F_ABORT) {
939 if ((trs->trso_flags &
944 trs->trso_flags &= ~TR_RAID1E_F_DOING_SOME;
949 trs->trso_flags &= ~TR_RAID1E_F_LOCKED;
951 trs->trso_lock_pos, trs->trso_lock_len);
959 if (trs->trso_stopping) {
960 trs->trso_flags &= ~TR_RAID1E_F_DOING_SOME;
965 if (--trs->trso_meta_update <= 0) {
968 trs->trso_meta_update =
974 trs->trso_meta_update *=
976 trs->trso_meta_update /=
980 trs->trso_flags &= ~TR_RAID1E_F_DOING_SOME;
981 if (--trs->trso_recover_slabs <= 0)
986 } else if (trs->trso_type == TR_RAID1E_RESYNC) {
1212 struct g_raid_tr_raid1e_object *trs;
1216 trs = (struct g_raid_tr_raid1e_object *)tr;
1217 trs->trso_fair_io = g_raid1e_rebuild_fair_io;
1218 trs->trso_recover_slabs = g_raid1e_rebuild_cluster_idle;
1222 trs->trso_recover_slabs *= g_raid1e_rebuild_slab;
1223 trs->trso_recover_slabs /= vol->v_strip_size;
1225 if (trs->trso_type == TR_RAID1E_REBUILD)
1233 struct g_raid_tr_raid1e_object *trs;
1235 trs = (struct g_raid_tr_raid1e_object *)tr;
1237 if (trs->trso_buffer != NULL) {
1238 free(trs->trso_buffer, M_TR_RAID1E);
1239 trs->trso_buffer = NULL;