Lines Matching refs:record
167 zinject_record_t *record) in object_from_path() argument
185 record->zi_objset = dmu_objset_id(os); in object_from_path()
186 record->zi_object = statbuf->st_ino; in object_from_path()
198 zinject_record_t *record) in calculate_range() argument
214 record->zi_start = 0; in calculate_range()
215 record->zi_end = -1ULL; in calculate_range()
220 record->zi_start = strtoull(range, &end, 10); in calculate_range()
224 record->zi_end = record->zi_start + 1; in calculate_range()
226 record->zi_end = strtoull(end + 1, &end, 10); in calculate_range()
253 record->zi_start = record->zi_object * sizeof (dnode_phys_t); in calculate_range()
254 record->zi_end = record->zi_start + sizeof (dnode_phys_t); in calculate_range()
255 record->zi_object = 0; in calculate_range()
270 if (record->zi_object == 0) { in calculate_range()
273 err = dnode_hold(os, record->zi_object, FTAG, &dn); in calculate_range()
277 (u_longlong_t)record->zi_object); in calculate_range()
289 if (record->zi_start != 0 || record->zi_end != -1ULL) { in calculate_range()
290 record->zi_start >>= dn->dn_datablkshift; in calculate_range()
291 record->zi_end >>= dn->dn_datablkshift; in calculate_range()
298 record->zi_level = level; in calculate_range()
301 record->zi_start, record->zi_end); in calculate_range()
309 if (record->zi_start != 0 || record->zi_end != 0) { in calculate_range()
313 record->zi_start >>= shift; in calculate_range()
314 record->zi_end >>= shift; in calculate_range()
333 int level, zinject_record_t *record, char *poolname, char *dataset) in translate_record() argument
352 record->zi_type = 0; in translate_record()
355 record->zi_type = DMU_OT_OBJECT_DIRECTORY; in translate_record()
358 record->zi_type = DMU_OT_OBJECT_ARRAY; in translate_record()
361 record->zi_type = DMU_OT_PACKED_NVLIST; in translate_record()
364 record->zi_type = DMU_OT_BPOBJ; in translate_record()
367 record->zi_type = DMU_OT_SPACE_MAP; in translate_record()
370 record->zi_type = DMU_OT_ERROR_LOG; in translate_record()
391 if (object_from_path(dataset, path, &statbuf, record) != 0) in translate_record()
394 ziprintf("raw objset: %llu\n", record->zi_objset); in translate_record()
395 ziprintf("raw object: %llu\n", record->zi_object); in translate_record()
400 if (calculate_range(dataset, type, level, (char *)range, record) != 0) in translate_record()
403 ziprintf(" objset: %llu\n", record->zi_objset); in translate_record()
404 ziprintf(" object: %llu\n", record->zi_object); in translate_record()
405 if (record->zi_start == 0 && in translate_record()
406 record->zi_end == -1ULL) in translate_record()
409 ziprintf(" range: [%llu, %llu]\n", record->zi_start, in translate_record()
410 record->zi_end); in translate_record()
427 translate_raw(const char *str, zinject_record_t *record) in translate_raw() argument
433 if (sscanf(str, "%llx:%llx:%x:%llx", (u_longlong_t *)&record->zi_objset, in translate_raw()
434 (u_longlong_t *)&record->zi_object, &record->zi_level, in translate_raw()
435 (u_longlong_t *)&record->zi_start) != 4) { in translate_raw()
441 record->zi_end = record->zi_start; in translate_raw()
448 zinject_record_t *record) in translate_device() argument
462 record->zi_guid = strtoull(device, &end, 16); in translate_device()
463 if (record->zi_guid == 0 || *end != '\0') { in translate_device()
473 &record->zi_guid) == 0); in translate_device()
482 if (record->zi_timer != 0) { in translate_device()
483 record->zi_cmd = ZINJECT_DELAY_IO; in translate_device()
485 record->zi_cmd = ZINJECT_LABEL_FAULT; in translate_device()
487 record->zi_cmd = ZINJECT_DEVICE_FAULT; in translate_device()
492 record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]); in translate_device()
493 record->zi_end = record->zi_start + VDEV_UBERBLOCK_RING - 1; in translate_device()
496 record->zi_start = offsetof(vdev_label_t, vl_vdev_phys); in translate_device()
497 record->zi_end = record->zi_start + VDEV_PHYS_SIZE - 1; in translate_device()
500 record->zi_start = offsetof(vdev_label_t, vl_pad1); in translate_device()
501 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1; in translate_device()
504 record->zi_start = offsetof(vdev_label_t, vl_pad2); in translate_device()
505 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1; in translate_device()