Lines Matching defs:record

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