Lines Matching refs:vol
655 struct g_raid_volume *vol; in g_raid_md_nvidia_start() local
668 vol = g_raid_create_volume(sc, buf, -1); in g_raid_md_nvidia_start()
669 vol->v_mediasize = (off_t)meta->total_sectors * 512; in g_raid_md_nvidia_start()
670 vol->v_raid_level_qualifier = G_RAID_VOLUME_RLQ_NONE; in g_raid_md_nvidia_start()
672 vol->v_raid_level = G_RAID_VOLUME_RL_RAID0; in g_raid_md_nvidia_start()
673 size = vol->v_mediasize / mdi->mdio_total_disks; in g_raid_md_nvidia_start()
675 vol->v_raid_level = G_RAID_VOLUME_RL_RAID1; in g_raid_md_nvidia_start()
676 size = vol->v_mediasize; in g_raid_md_nvidia_start()
678 vol->v_raid_level = G_RAID_VOLUME_RL_RAID1E; in g_raid_md_nvidia_start()
679 size = vol->v_mediasize / (mdi->mdio_total_disks / 2); in g_raid_md_nvidia_start()
682 vol->v_raid_level = G_RAID_VOLUME_RL_SINGLE; in g_raid_md_nvidia_start()
684 vol->v_raid_level = G_RAID_VOLUME_RL_CONCAT; in g_raid_md_nvidia_start()
687 vol->v_raid_level = G_RAID_VOLUME_RL_RAID5; in g_raid_md_nvidia_start()
688 vol->v_raid_level_qualifier = G_RAID_VOLUME_RLQ_R5LA; in g_raid_md_nvidia_start()
689 size = vol->v_mediasize / (mdi->mdio_total_disks - 1); in g_raid_md_nvidia_start()
691 vol->v_raid_level = G_RAID_VOLUME_RL_RAID5; in g_raid_md_nvidia_start()
692 vol->v_raid_level_qualifier = G_RAID_VOLUME_RLQ_R5LS; in g_raid_md_nvidia_start()
693 size = vol->v_mediasize / (mdi->mdio_total_disks - 1); in g_raid_md_nvidia_start()
695 vol->v_raid_level = G_RAID_VOLUME_RL_UNKNOWN; in g_raid_md_nvidia_start()
698 vol->v_strip_size = meta->strip_sectors * 512; //ZZZ in g_raid_md_nvidia_start()
699 vol->v_disks_count = mdi->mdio_total_disks; in g_raid_md_nvidia_start()
700 vol->v_sectorsize = 512; //ZZZ in g_raid_md_nvidia_start()
701 for (j = 0; j < vol->v_disks_count; j++) { in g_raid_md_nvidia_start()
702 sd = &vol->v_subdisks[j]; in g_raid_md_nvidia_start()
706 g_raid_start_volume(vol); in g_raid_md_nvidia_start()
715 sd = &vol->v_subdisks[disk_pos]; in g_raid_md_nvidia_start()
737 g_raid_event_send(vol, G_RAID_VOLUME_E_START, G_RAID_EVENT_VOLUME); in g_raid_md_nvidia_start()
1027 struct g_raid_volume *vol; in g_raid_md_ctl_nvidia() local
1200 vol = g_raid_create_volume(sc, volname, -1); in g_raid_md_ctl_nvidia()
1201 vol->v_md_data = (void *)(intptr_t)0; in g_raid_md_ctl_nvidia()
1202 vol->v_raid_level = level; in g_raid_md_ctl_nvidia()
1203 vol->v_raid_level_qualifier = qual; in g_raid_md_ctl_nvidia()
1204 vol->v_strip_size = strip; in g_raid_md_ctl_nvidia()
1205 vol->v_disks_count = numdisks; in g_raid_md_ctl_nvidia()
1206 vol->v_mediasize = volsize; in g_raid_md_ctl_nvidia()
1207 vol->v_sectorsize = sectorsize; in g_raid_md_ctl_nvidia()
1208 g_raid_start_volume(vol); in g_raid_md_ctl_nvidia()
1213 sd = &vol->v_subdisks[pd->pd_disk_pos]; in g_raid_md_ctl_nvidia()
1237 g_raid_event_send(vol, G_RAID_VOLUME_E_START, in g_raid_md_ctl_nvidia()
1393 struct g_raid_volume *vol; in g_raid_md_write_nvidia() local
1408 vol = TAILQ_FIRST(&sc->sc_volumes); in g_raid_md_write_nvidia()
1417 meta->total_sectors = vol->v_mediasize / vol->v_sectorsize; in g_raid_md_write_nvidia()
1418 meta->sector_size = vol->v_sectorsize; in g_raid_md_write_nvidia()
1419 nvidia_meta_put_name(meta, vol->v_name); in g_raid_md_write_nvidia()
1423 if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID1) in g_raid_md_write_nvidia()
1425 else if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID1E) in g_raid_md_write_nvidia()
1426 meta->array_width = vol->v_disks_count / 2; in g_raid_md_write_nvidia()
1427 else if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID5) in g_raid_md_write_nvidia()
1428 meta->array_width = vol->v_disks_count - 1; in g_raid_md_write_nvidia()
1430 meta->array_width = vol->v_disks_count; in g_raid_md_write_nvidia()
1431 meta->total_disks = vol->v_disks_count; in g_raid_md_write_nvidia()
1433 if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID0) in g_raid_md_write_nvidia()
1435 else if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID1) in g_raid_md_write_nvidia()
1437 else if (vol->v_raid_level == G_RAID_VOLUME_RL_RAID1E) in g_raid_md_write_nvidia()
1439 else if (vol->v_raid_level == G_RAID_VOLUME_RL_CONCAT || in g_raid_md_write_nvidia()
1440 vol->v_raid_level == G_RAID_VOLUME_RL_SINGLE) in g_raid_md_write_nvidia()
1442 else if (vol->v_raid_level_qualifier == G_RAID_VOLUME_RLQ_R5LA) in g_raid_md_write_nvidia()
1446 meta->strip_sectors = vol->v_strip_size / vol->v_sectorsize; in g_raid_md_write_nvidia()
1447 meta->strip_bytes = vol->v_strip_size; in g_raid_md_write_nvidia()
1451 meta->stripe_bytes = meta->stripe_sectors * vol->v_sectorsize; in g_raid_md_write_nvidia()
1457 for (i = 0; i < vol->v_disks_count; i++) { in g_raid_md_write_nvidia()
1458 sd = &vol->v_subdisks[i]; in g_raid_md_write_nvidia()
1461 vol->v_dirty) && in g_raid_md_write_nvidia()
1491 sd->sd_rebuild_pos / vol->v_sectorsize * in g_raid_md_write_nvidia()