Lines Matching refs:record
159 object_from_path(const char *dataset, uint64_t object, zinject_record_t *record) in object_from_path() argument
166 record->zi_objset = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID); in object_from_path()
167 record->zi_object = object; in object_from_path()
179 zinject_record_t *record) in initialize_range() argument
190 record->zi_start = 0; in initialize_range()
191 record->zi_end = -1ULL; in initialize_range()
196 record->zi_start = strtoull(range, &end, 10); in initialize_range()
200 record->zi_end = record->zi_start + 1; in initialize_range()
202 record->zi_end = strtoull(end + 1, &end, 10); in initialize_range()
229 record->zi_start = record->zi_object * sizeof (dnode_phys_t); in initialize_range()
230 record->zi_end = record->zi_start + sizeof (dnode_phys_t); in initialize_range()
231 record->zi_object = 0; in initialize_range()
235 record->zi_level = level; in initialize_range()
242 int level, zinject_record_t *record, char *poolname, char *dataset) in translate_record() argument
259 record->zi_type = 0; in translate_record()
262 record->zi_type = DMU_OT_OBJECT_DIRECTORY; in translate_record()
265 record->zi_type = DMU_OT_OBJECT_ARRAY; in translate_record()
268 record->zi_type = DMU_OT_PACKED_NVLIST; in translate_record()
271 record->zi_type = DMU_OT_BPOBJ; in translate_record()
274 record->zi_type = DMU_OT_SPACE_MAP; in translate_record()
277 record->zi_type = DMU_OT_ERROR_LOG; in translate_record()
298 if (object_from_path(dataset, statbuf.st_ino, record) != 0) in translate_record()
301 ziprintf("raw objset: %llu\n", record->zi_objset); in translate_record()
302 ziprintf("raw object: %llu\n", record->zi_object); in translate_record()
307 if (initialize_range(type, level, (char *)range, record) != 0) in translate_record()
310 ziprintf(" objset: %llu\n", record->zi_objset); in translate_record()
311 ziprintf(" object: %llu\n", record->zi_object); in translate_record()
312 if (record->zi_start == 0 && in translate_record()
313 record->zi_end == -1ULL) in translate_record()
316 ziprintf(" range: [%llu, %llu]\n", record->zi_start, in translate_record()
317 record->zi_end); in translate_record()
333 translate_raw(const char *str, zinject_record_t *record) in translate_raw() argument
339 if (sscanf(str, "%llx:%llx:%x:%llx", (u_longlong_t *)&record->zi_objset, in translate_raw()
340 (u_longlong_t *)&record->zi_object, &record->zi_level, in translate_raw()
341 (u_longlong_t *)&record->zi_start) != 4) { in translate_raw()
347 record->zi_end = record->zi_start; in translate_raw()
354 zinject_record_t *record) in translate_device() argument
368 record->zi_guid = strtoull(device, &end, 16); in translate_device()
369 if (record->zi_guid == 0 || *end != '\0') { in translate_device()
379 &record->zi_guid) == 0); in translate_device()
388 if (record->zi_timer != 0) { in translate_device()
389 record->zi_cmd = ZINJECT_DELAY_IO; in translate_device()
391 record->zi_cmd = ZINJECT_LABEL_FAULT; in translate_device()
393 record->zi_cmd = ZINJECT_DEVICE_FAULT; in translate_device()
398 record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]); in translate_device()
399 record->zi_end = record->zi_start + VDEV_UBERBLOCK_RING - 1; in translate_device()
402 record->zi_start = offsetof(vdev_label_t, vl_vdev_phys); in translate_device()
403 record->zi_end = record->zi_start + VDEV_PHYS_SIZE - 1; in translate_device()
406 record->zi_start = offsetof(vdev_label_t, vl_pad1); in translate_device()
407 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1; in translate_device()
410 record->zi_start = offsetof(vdev_label_t, vl_be); in translate_device()
411 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1; in translate_device()