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

Lines Matching defs:vdc

78 	struct ddf_vdc_record *vdc;
225 struct ddf_vdc_record *vdc;
320 vdc = GETVDCPTR(meta, j);
321 val = GET32D(meta, vdc->Signature);
326 print_guid(vdc->VD_GUID);
329 GET32D(meta, vdc->Timestamp));
331 GET32D(meta, vdc->Sequence_Number));
333 GET16D(meta, vdc->Primary_Element_Count));
335 GET8D(meta, vdc->Stripe_Size));
337 GET8D(meta, vdc->Primary_RAID_Level));
339 GET8D(meta, vdc->RLQ));
341 GET8D(meta, vdc->Secondary_Element_Count));
343 GET8D(meta, vdc->Secondary_Element_Seq));
345 GET8D(meta, vdc->Secondary_RAID_Level));
347 GET64D(meta, vdc->Block_Count));
349 GET64D(meta, vdc->VD_Size));
351 GET16D(meta, vdc->Block_Size));
353 GET8D(meta, vdc->Rotate_Parity_count));
356 if (GET32D(meta, vdc->Associated_Spares[i]) != 0xffffffff)
357 printf(" 0x%08x", GET32D(meta, vdc->Associated_Spares[i]));
361 GET64D(meta, vdc->Cache_Flags));
363 GET8D(meta, vdc->BG_Rate));
365 GET8D(meta, vdc->MDF_Parity_Disks));
367 GET16D(meta, vdc->MDF_Parity_Generator_Polynomial));
369 GET8D(meta, vdc->MDF_Constant_Generation_Method));
371 num2 = GET16D(meta, vdc->Primary_Element_Count);
372 val2 = (uint64_t *)&(vdc->Physical_Disk_Sequence[GET16(meta, hdr->Max_Primary_Element_Entries)]);
375 GET32D(meta, vdc->Physical_Disk_Sequence[i]),
381 vuc = (struct ddf_vuc_record *)vdc;
388 sa = (struct ddf_sa_record *)vdc;
478 struct ddf_vdc_record *vdc;
483 vdc = GETVDCPTR(meta, i);
485 if (GET32D(meta, vdc->Signature) == DDF_VDCR_SIGNATURE &&
486 memcmp(vdc->VD_GUID, GUID, 24) == 0)
487 return (vdc);
489 if (GET32D(meta, vdc->Signature) == 0xffffffff ||
490 GET32D(meta, vdc->Signature) == 0)
491 return (vdc);
499 struct ddf_vdc_record *vdc;
505 vdc = GETVDCPTR(meta, i);
506 if (GET32D(meta, vdc->Signature) != DDF_VDCR_SIGNATURE)
508 if (GUID == NULL || memcmp(vdc->VD_GUID, GUID, 24) == 0)
521 for (bvd = 0; bvd < GET8(vmeta, vdc->Secondary_Element_Count); bvd++) {
523 i += GET16(vmeta, vdc->Primary_Element_Count); // XXX
863 meta->vdc = malloc(size, M_MD_DDF, M_WAITOK);
864 memset(meta->vdc, 0xff, size);
865 SET32(meta, vdc->Signature, DDF_VDCR_SIGNATURE);
866 memcpy(meta->vdc->VD_GUID, meta->vde->VD_GUID, 24);
867 SET32(meta, vdc->Sequence_Number, 0);
875 struct ddf_vdc_record *vdc;
880 vdc = ddf_meta_find_vdc(src, GUID);
881 if (GET8D(src, vdc->Secondary_Element_Count) == 1)
884 bvd = GET8D(src, vdc->Secondary_Element_Seq);
887 if (dst->vdc == NULL ||
888 (!started && ((int32_t)(GET32D(src, vdc->Sequence_Number) -
889 GET32(dst, vdc->Sequence_Number))) > 0))
895 (!started && ((int32_t)(GET32D(src, vdc->Sequence_Number) -
916 if (dst->vdc != NULL)
917 free(dst->vdc, M_MD_DDF);
918 dst->vdc = malloc(size, M_MD_DDF, M_WAITOK);
919 memcpy(dst->vdc, vdc, size);
925 memcpy(dst->bvdc[bvd], vdc, size);
946 if (meta->vdc != NULL) {
947 free(meta->vdc, M_MD_DDF);
948 meta->vdc = NULL;
961 struct ddf_vdc_record *vdc;
976 vdc = GETVDCPTR(meta, i);
977 if (GET32D(meta, vdc->Signature) != DDF_VDCR_SIGNATURE)
979 for (pos = 0; pos < GET16D(meta, vdc->Primary_Element_Count); pos++)
980 if (GET32D(meta, vdc->Physical_Disk_Sequence[pos]) == ref)
982 if (pos == GET16D(meta, vdc->Primary_Element_Count))
984 offp = (uint64_t *)&(vdc->Physical_Disk_Sequence[
987 end1 = beg1 + GET64D(meta, vdc->Block_Count);
1274 struct ddf_vdc_record *vdc;
1330 vdc = GETVDCPTR(meta, i);
1331 SET32D(meta, vdc->CRC, 0xffffffff);
1332 SET32D(meta, vdc->CRC, crc32(vdc, size));
1651 if ((vdc1 = ddf_meta_find_vdc(pdmeta, vmeta->vdc->VD_GUID)) != NULL)
1696 md_disk_bvd = disk_pos / GET16(vmeta, vdc->Primary_Element_Count); // XXX
1697 md_disk_pos = disk_pos % GET16(vmeta, vdc->Primary_Element_Count); // XXX
1750 (vdc1 = ddf_meta_find_vdc(pdmeta, vmeta->vdc->VD_GUID)) != NULL) {
1871 vol->v_raid_level = GET8(vmeta, vdc->Primary_RAID_Level);
1872 vol->v_raid_level_qualifier = GET8(vmeta, vdc->RLQ);
1873 if (GET8(vmeta, vdc->Secondary_Element_Count) > 1 &&
1875 GET8(vmeta, vdc->Secondary_RAID_Level) == 0)
1877 vol->v_sectorsize = GET16(vmeta, vdc->Block_Size);
1880 vol->v_strip_size = vol->v_sectorsize << GET8(vmeta, vdc->Stripe_Size);
1881 vol->v_disks_count = GET16(vmeta, vdc->Primary_Element_Count) *
1882 GET8(vmeta, vdc->Secondary_Element_Count);
1883 vol->v_mdf_pdisks = GET8(vmeta, vdc->MDF_Parity_Disks);
1884 vol->v_mdf_polynomial = GET16(vmeta, vdc->MDF_Parity_Generator_Polynomial);
1885 vol->v_mdf_method = GET8(vmeta, vdc->MDF_Constant_Generation_Method);
1886 if (GET8(vmeta, vdc->Rotate_Parity_count) > 31)
1889 vol->v_rotate_parity = 1 << GET8(vmeta, vdc->Rotate_Parity_count);
1890 vol->v_mediasize = GET64(vmeta, vdc->VD_Size) * vol->v_sectorsize;
1892 if (j == GET16(vmeta, vdc->Primary_Element_Count)) {
1899 sd->sd_size = GET64(vmeta, vdc->Block_Count) *
1914 if (ddf_meta_find_vdc(&pd->pd_meta, vmeta->vdc->VD_GUID) != NULL)
1958 struct ddf_vdc_record *vdc;
1978 vdc = GETVDCPTR(pdmeta, j);
1979 val = GET32D(pdmeta, vdc->Signature);
1987 k = ddf_meta_find_vd(pdmeta, vdc->VD_GUID);
1993 vol = g_raid_md_ddf_get_volume(sc, vdc->VD_GUID);
2010 ddf_vol_meta_update(vmeta, pdmeta, vdc->VD_GUID, pv->pv_started);
2022 if (ddf_meta_find_vdc(pdmeta, vmeta->vdc->VD_GUID) == NULL)
2034 for (k = 0; k < GET8(vmeta, vdc->Secondary_Element_Count); k++) {
2036 need += GET16(vmeta, vdc->Primary_Element_Count);
2734 struct ddf_vdc_record *vdc;
2772 SET32(vmeta, vdc->Sequence_Number,
2773 GET32(vmeta, vdc->Sequence_Number) + 1);
2776 SET16(vmeta, vdc->Primary_Element_Count, 2);
2778 SET16(vmeta, vdc->Primary_Element_Count,
2780 SET8(vmeta, vdc->Stripe_Size,
2784 SET8(vmeta, vdc->Primary_RAID_Level,
2786 SET8(vmeta, vdc->RLQ, 0);
2787 SET8(vmeta, vdc->Secondary_Element_Count,
2789 SET8(vmeta, vdc->Secondary_RAID_Level, 0);
2791 SET8(vmeta, vdc->Primary_RAID_Level,
2793 SET8(vmeta, vdc->RLQ,
2795 SET8(vmeta, vdc->Secondary_Element_Count, 1);
2796 SET8(vmeta, vdc->Secondary_RAID_Level, 0);
2798 SET8(vmeta, vdc->Secondary_Element_Seq, 0);
2799 SET64(vmeta, vdc->Block_Count, 0);
2800 SET64(vmeta, vdc->VD_Size, vol->v_mediasize / vol->v_sectorsize);
2801 SET16(vmeta, vdc->Block_Size, vol->v_sectorsize);
2802 SET8(vmeta, vdc->Rotate_Parity_count,
2804 SET8(vmeta, vdc->MDF_Parity_Disks, vol->v_mdf_pdisks);
2805 SET16(vmeta, vdc->MDF_Parity_Generator_Polynomial,
2807 SET8(vmeta, vdc->MDF_Constant_Generation_Method,
2829 bvd = i / GET16(vmeta, vdc->Primary_Element_Count);
2830 pos = i % GET16(vmeta, vdc->Primary_Element_Count);
2842 memcpy(vmeta->bvdc[bvd], vmeta->vdc,
2960 vdc = GETVDCPTR(&pd->pd_meta, i);
2961 if (GET32D(&pd->pd_meta, vdc->Signature) !=
2964 SET32D(&pd->pd_meta, vdc->Signature, 0xffffffff);
2973 vdc = ddf_meta_find_vdc(&pd->pd_meta,
2975 if (vdc == NULL)
2976 vdc = ddf_meta_find_vdc(&pd->pd_meta, NULL);
2977 if (vdc != NULL) {
2979 vdc->Primary_Element_Count);
2980 memcpy(vdc, vmeta->bvdc[bvd],