Lines Matching refs:GET32

136 #define GET32(m, f)	((m)->bigendian ? be32dec(&(m)->f) : le32dec(&(m)->f))  macro
179 #define GETCRNUM(m) (GET32((m), hdr->cr_length) / \
240 printf("Sequence_Number 0x%08x\n", GET32(meta, hdr->Sequence_Number)); in g_raid_md_ddf_print()
241 printf("TimeStamp 0x%08x\n", GET32(meta, hdr->TimeStamp)); in g_raid_md_ddf_print()
247 printf("WorkSpace_Length %u\n", GET32(meta, hdr->WorkSpace_Length)); in g_raid_md_ddf_print()
254 printf("Controller Data %u:%u\n", GET32(meta, hdr->cd_section), GET32(meta, hdr->cd_length)); in g_raid_md_ddf_print()
255 …printf("Physical Disk %u:%u\n", GET32(meta, hdr->pdr_section), GET32(meta, hdr->pdr_length)… in g_raid_md_ddf_print()
256 …printf("Virtual Disk %u:%u\n", GET32(meta, hdr->vdr_section), GET32(meta, hdr->vdr_length)… in g_raid_md_ddf_print()
257 printf("Configuration Recs %u:%u\n", GET32(meta, hdr->cr_section), GET32(meta, hdr->cr_length)); in g_raid_md_ddf_print()
258 …printf("Physical Disk Recs %u:%u\n", GET32(meta, hdr->pdd_section), GET32(meta, hdr->pdd_length)… in g_raid_md_ddf_print()
259 …printf("BBM Log %u:%u\n", GET32(meta, hdr->bbmlog_section), GET32(meta, hdr->bbmlog_l… in g_raid_md_ddf_print()
260 …printf("Diagnostic Space %u:%u\n", GET32(meta, hdr->Diagnostic_Space), GET32(meta, hdr->Diagno… in g_raid_md_ddf_print()
261 …printf("Vendor_Specific_Logs %u:%u\n", GET32(meta, hdr->Vendor_Specific_Logs), GET32(meta, hdr->Ve… in g_raid_md_ddf_print()
278 if (GET32(meta, pdr->entry[j].PD_Reference) == 0xffffffff) in g_raid_md_ddf_print()
284 GET32(meta, pdr->entry[j].PD_Reference)); in g_raid_md_ddf_print()
420 GET32(meta, pdd->PD_Reference)); in g_raid_md_ddf_print()
437 if (GET32(meta, pdr->entry[i].PD_Reference) == PD_Reference) in ddf_meta_find_pd()
527 if (GET32(vmeta, bvdc[bvd]->Physical_Disk_Sequence[pos]) == in ddf_meta_find_disk()
598 howmany(GET32(sample, hdr->WorkSpace_Length) * in ddf_meta_create()
605 howmany(GET32(sample, hdr->cd_length) * in ddf_meta_create()
608 howmany(GET32(sample, hdr->pdr_length) * in ddf_meta_create()
611 howmany(GET32(sample, hdr->vdr_length) * in ddf_meta_create()
614 howmany(GET32(sample, hdr->cr_length) * in ddf_meta_create()
617 howmany(GET32(sample, hdr->pdd_length) * in ddf_meta_create()
620 howmany(GET32(sample, hdr->bbmlog_length) * in ddf_meta_create()
623 howmany(GET32(sample, hdr->bbmlog_length) * in ddf_meta_create()
626 howmany(GET32(sample, hdr->bbmlog_length) * in ddf_meta_create()
664 pos += GET32(meta, hdr->cd_length); in ddf_meta_create()
666 pos += GET32(meta, hdr->pdr_length); in ddf_meta_create()
668 pos += GET32(meta, hdr->vdr_length); in ddf_meta_create()
670 pos += GET32(meta, hdr->cr_length); in ddf_meta_create()
672 pos += GET32(meta, hdr->pdd_length); in ddf_meta_create()
674 GET32(meta, hdr->bbmlog_length) != 0 ? pos : 0xffffffff); in ddf_meta_create()
675 pos += GET32(meta, hdr->bbmlog_length); in ddf_meta_create()
677 GET32(meta, hdr->Diagnostic_Space_Length) != 0 ? pos : 0xffffffff); in ddf_meta_create()
678 pos += GET32(meta, hdr->Diagnostic_Space_Length); in ddf_meta_create()
680 GET32(meta, hdr->Vendor_Specific_Logs_Length) != 0 ? pos : 0xffffffff); in ddf_meta_create()
681 pos += min(GET32(meta, hdr->Vendor_Specific_Logs_Length), 1); in ddf_meta_create()
690 size = GET32(meta, hdr->cd_length) * ss; in ddf_meta_create()
698 size = GET32(meta, hdr->pdr_length) * ss; in ddf_meta_create()
723 size = GET32(meta, hdr->vdr_length) * ss; in ddf_meta_create()
732 size = GET32(meta, hdr->cr_length) * ss; in ddf_meta_create()
737 size = GET32(meta, hdr->pdd_length) * ss; in ddf_meta_create()
747 if (GET32(meta, hdr->bbmlog_length) != 0) { in ddf_meta_create()
748 size = GET32(meta, hdr->bbmlog_length) * ss; in ddf_meta_create()
766 dst->cdr = malloc(GET32(src, hdr->cd_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_copy()
767 memcpy(dst->cdr, src->cdr, GET32(src, hdr->cd_length) * ss); in ddf_meta_copy()
768 dst->pdr = malloc(GET32(src, hdr->pdr_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_copy()
769 memcpy(dst->pdr, src->pdr, GET32(src, hdr->pdr_length) * ss); in ddf_meta_copy()
770 dst->vdr = malloc(GET32(src, hdr->vdr_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_copy()
771 memcpy(dst->vdr, src->vdr, GET32(src, hdr->vdr_length) * ss); in ddf_meta_copy()
772 dst->cr = malloc(GET32(src, hdr->cr_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_copy()
773 memcpy(dst->cr, src->cr, GET32(src, hdr->cr_length) * ss); in ddf_meta_copy()
774 dst->pdd = malloc(GET32(src, hdr->pdd_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_copy()
775 memcpy(dst->pdd, src->pdd, GET32(src, hdr->pdd_length) * ss); in ddf_meta_copy()
777 dst->bbm = malloc(GET32(src, hdr->bbmlog_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_copy()
778 memcpy(dst->bbm, src->bbm, GET32(src, hdr->bbmlog_length) * ss); in ddf_meta_copy()
793 GET32(src, pdr->entry[i].PD_Reference)); in ddf_meta_update()
852 meta->cdr = malloc(GET32(sample, hdr->cd_length) * ss, M_MD_DDF, M_WAITOK); in ddf_vol_meta_create()
853 memcpy(meta->cdr, sample->cdr, GET32(sample, hdr->cd_length) * ss); in ddf_vol_meta_create()
888 GET32(dst, vdc->Sequence_Number))) > 0)) in ddf_vol_meta_update()
895 GET32(dst, bvdc[bvd]->Sequence_Number))) > 0)) in ddf_vol_meta_update()
909 dst->cdr = malloc(GET32(src, hdr->cd_length) * ss, M_MD_DDF, M_WAITOK); in ddf_vol_meta_update()
910 memcpy(dst->cdr, src->cdr, GET32(src, hdr->cd_length) * ss); in ddf_vol_meta_update()
968 ref = GET32(meta, pdd->PD_Reference); in ddf_meta_unused_range()
1078 val = GET32(meta, hdr->CRC); in ddf_meta_read()
1119 val = GET32(meta, hdr->CRC); in ddf_meta_read()
1141 len = max(len, GET32(meta, hdr->cd_section) + GET32(meta, hdr->cd_length)); in ddf_meta_read()
1142 len = max(len, GET32(meta, hdr->pdr_section) + GET32(meta, hdr->pdr_length)); in ddf_meta_read()
1143 len = max(len, GET32(meta, hdr->vdr_section) + GET32(meta, hdr->vdr_length)); in ddf_meta_read()
1144 len = max(len, GET32(meta, hdr->cr_section) + GET32(meta, hdr->cr_length)); in ddf_meta_read()
1145 len = max(len, GET32(meta, hdr->pdd_section) + GET32(meta, hdr->pdd_length)); in ddf_meta_read()
1146 if ((val = GET32(meta, hdr->bbmlog_section)) != 0xffffffff) in ddf_meta_read()
1147 len = max(len, val + GET32(meta, hdr->bbmlog_length)); in ddf_meta_read()
1148 if ((val = GET32(meta, hdr->Diagnostic_Space)) != 0xffffffff) in ddf_meta_read()
1149 len = max(len, val + GET32(meta, hdr->Diagnostic_Space_Length)); in ddf_meta_read()
1150 if ((val = GET32(meta, hdr->Vendor_Specific_Logs)) != 0xffffffff) in ddf_meta_read()
1151 len = max(len, val + GET32(meta, hdr->Vendor_Specific_Logs_Length)); in ddf_meta_read()
1163 if (GET32(meta, hdr->cd_length) * ss >= maxphys || in ddf_meta_read()
1164 GET32(meta, hdr->pdr_length) * ss >= maxphys || in ddf_meta_read()
1165 GET32(meta, hdr->vdr_length) * ss >= maxphys || in ddf_meta_read()
1166 GET32(meta, hdr->cr_length) * ss >= maxphys || in ddf_meta_read()
1167 GET32(meta, hdr->pdd_length) * ss >= maxphys || in ddf_meta_read()
1168 GET32(meta, hdr->bbmlog_length) * ss >= maxphys) { in ddf_meta_read()
1174 buf = g_read_data(cp, (lba + GET32(meta, hdr->cd_section)) * ss, in ddf_meta_read()
1175 GET32(meta, hdr->cd_length) * ss, &error); in ddf_meta_read()
1178 meta->cdr = malloc(GET32(meta, hdr->cd_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_read()
1179 memcpy(meta->cdr, buf, GET32(meta, hdr->cd_length) * ss); in ddf_meta_read()
1181 if (GET32(meta, cdr->Signature) != DDF_CONTROLLER_DATA_SIGNATURE) in ddf_meta_read()
1185 buf = g_read_data(cp, (lba + GET32(meta, hdr->pdr_section)) * ss, in ddf_meta_read()
1186 GET32(meta, hdr->pdr_length) * ss, &error); in ddf_meta_read()
1189 meta->pdr = malloc(GET32(meta, hdr->pdr_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_read()
1190 memcpy(meta->pdr, buf, GET32(meta, hdr->pdr_length) * ss); in ddf_meta_read()
1192 if (GET32(meta, pdr->Signature) != DDF_PDR_SIGNATURE) in ddf_meta_read()
1202 if (GET32(meta, pdr->entry[i].PD_Reference) == in ddf_meta_read()
1218 buf = g_read_data(cp, (lba + GET32(meta, hdr->vdr_section)) * ss, in ddf_meta_read()
1219 GET32(meta, hdr->vdr_length) * ss, &error); in ddf_meta_read()
1222 meta->vdr = malloc(GET32(meta, hdr->vdr_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_read()
1223 memcpy(meta->vdr, buf, GET32(meta, hdr->vdr_length) * ss); in ddf_meta_read()
1225 if (GET32(meta, vdr->Signature) != DDF_VD_RECORD_SIGNATURE) in ddf_meta_read()
1229 buf = g_read_data(cp, (lba + GET32(meta, hdr->cr_section)) * ss, in ddf_meta_read()
1230 GET32(meta, hdr->cr_length) * ss, &error); in ddf_meta_read()
1233 meta->cr = malloc(GET32(meta, hdr->cr_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_read()
1234 memcpy(meta->cr, buf, GET32(meta, hdr->cr_length) * ss); in ddf_meta_read()
1238 buf = g_read_data(cp, (lba + GET32(meta, hdr->pdd_section)) * ss, in ddf_meta_read()
1239 GET32(meta, hdr->pdd_length) * ss, &error); in ddf_meta_read()
1242 meta->pdd = malloc(GET32(meta, hdr->pdd_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_read()
1243 memcpy(meta->pdd, buf, GET32(meta, hdr->pdd_length) * ss); in ddf_meta_read()
1245 if (GET32(meta, pdd->Signature) != DDF_PDD_SIGNATURE) in ddf_meta_read()
1247 i = ddf_meta_find_pd(meta, NULL, GET32(meta, pdd->PD_Reference)); in ddf_meta_read()
1252 if (GET32(meta, hdr->bbmlog_section) != 0xffffffff && in ddf_meta_read()
1253 GET32(meta, hdr->bbmlog_length) != 0) { in ddf_meta_read()
1254 buf = g_read_data(cp, (lba + GET32(meta, hdr->bbmlog_section)) * ss, in ddf_meta_read()
1255 GET32(meta, hdr->bbmlog_length) * ss, &error); in ddf_meta_read()
1258 meta->bbm = malloc(GET32(meta, hdr->bbmlog_length) * ss, M_MD_DDF, M_WAITOK); in ddf_meta_read()
1259 memcpy(meta->bbm, buf, GET32(meta, hdr->bbmlog_length) * ss); in ddf_meta_read()
1261 if (GET32(meta, bbm->Signature) != DDF_BBML_SIGNATURE) in ddf_meta_read()
1305 size = GET32(meta, hdr->cd_length) * ss; in ddf_meta_write()
1308 error = g_write_data(cp, (lba + GET32(meta, hdr->cd_section)) * ss, in ddf_meta_write()
1313 size = GET32(meta, hdr->pdr_length) * ss; in ddf_meta_write()
1316 error = g_write_data(cp, (lba + GET32(meta, hdr->pdr_section)) * ss, in ddf_meta_write()
1321 size = GET32(meta, hdr->vdr_length) * ss; in ddf_meta_write()
1324 error = g_write_data(cp, (lba + GET32(meta, hdr->vdr_section)) * ss, in ddf_meta_write()
1336 error = g_write_data(cp, (lba + GET32(meta, hdr->cr_section)) * ss, in ddf_meta_write()
1341 size = GET32(meta, hdr->pdd_length) * ss; in ddf_meta_write()
1344 error = g_write_data(cp, (lba + GET32(meta, hdr->pdd_section)) * ss, in ddf_meta_write()
1349 if (GET32(meta, hdr->bbmlog_length) != 0) { in ddf_meta_write()
1350 size = GET32(meta, hdr->bbmlog_length) * ss; in ddf_meta_write()
1354 (lba + GET32(meta, hdr->bbmlog_section)) * ss, in ddf_meta_write()
1416 if (GET32(meta, pdd->PD_Reference) == id) in g_raid_md_ddf_get_disk()
1630 reference = GET32(&pd->pd_meta, pdd->PD_Reference); in g_raid_md_ddf_start_disk()
2044 val = GET32(vmeta, bvdc[k]->Physical_Disk_Sequence[i]); in g_raid_md_ddf_new_disk()
2772 GET32(vmeta, vdc->Sequence_Number) + 1); in g_raid_md_write_ddf()
2847 GET32(&pd->pd_meta, pdd->PD_Reference)); in g_raid_md_write_ddf()
2857 GET32(vmeta, bvdc[bvd]->Physical_Disk_Sequence[pos])); in g_raid_md_write_ddf()
2886 GET32(&pd->pd_meta, pdd->PD_Reference)); in g_raid_md_write_ddf()
2921 NULL, GET32(gmeta, pdr->entry[i].PD_Reference)) != NULL) in g_raid_md_write_ddf()
2937 GET32(&pd->pd_meta, hdr->pdr_length) * in g_raid_md_write_ddf()
3015 i = ddf_meta_find_pd(&pd->pd_meta, NULL, GET32(&pd->pd_meta, pdd->PD_Reference)); in g_raid_md_fail_disk_ddf()