Lines Matching refs:record
134 object_from_path(const char *dataset, uint64_t object, zinject_record_t *record) in object_from_path() argument
141 record->zi_objset = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID); in object_from_path()
142 record->zi_object = object; in object_from_path()
154 zinject_record_t *record) in initialize_range() argument
165 record->zi_start = 0; in initialize_range()
166 record->zi_end = -1ULL; in initialize_range()
171 record->zi_start = strtoull(range, &end, 10); in initialize_range()
175 record->zi_end = record->zi_start + 1; in initialize_range()
177 record->zi_end = strtoull(end + 1, &end, 10); in initialize_range()
207 record->zi_start = record->zi_object * sizeof (dnode_phys_t); in initialize_range()
208 record->zi_end = record->zi_start + sizeof (dnode_phys_t); in initialize_range()
209 record->zi_object = 0; in initialize_range()
213 record->zi_level = level; in initialize_range()
220 int level, zinject_record_t *record, char *poolname, char *dataset) in translate_record() argument
239 record->zi_type = 0; in translate_record()
242 record->zi_type = DMU_OT_OBJECT_DIRECTORY; in translate_record()
245 record->zi_type = DMU_OT_OBJECT_ARRAY; in translate_record()
248 record->zi_type = DMU_OT_PACKED_NVLIST; in translate_record()
251 record->zi_type = DMU_OT_BPOBJ; in translate_record()
254 record->zi_type = DMU_OT_SPACE_MAP; in translate_record()
257 record->zi_type = DMU_OT_ERROR_LOG; in translate_record()
278 if (object_from_path(dataset, statbuf.st_ino, record) != 0) in translate_record()
281 ziprintf("raw objset: %llu\n", record->zi_objset); in translate_record()
282 ziprintf("raw object: %llu\n", record->zi_object); in translate_record()
287 if (initialize_range(type, level, (char *)range, record) != 0) in translate_record()
290 ziprintf(" objset: %llu\n", record->zi_objset); in translate_record()
291 ziprintf(" object: %llu\n", record->zi_object); in translate_record()
292 if (record->zi_start == 0 && in translate_record()
293 record->zi_end == -1ULL) in translate_record()
296 ziprintf(" range: [%llu, %llu]\n", record->zi_start, in translate_record()
297 record->zi_end); in translate_record()
313 translate_raw(const char *str, zinject_record_t *record) in translate_raw() argument
319 if (sscanf(str, "%llx:%llx:%x:%llx", (u_longlong_t *)&record->zi_objset, in translate_raw()
320 (u_longlong_t *)&record->zi_object, &record->zi_level, in translate_raw()
321 (u_longlong_t *)&record->zi_start) != 4) { in translate_raw()
327 record->zi_end = record->zi_start; in translate_raw()
334 zinject_record_t *record) in translate_device() argument
348 record->zi_guid = strtoull(device, &end, 0); in translate_device()
349 if (record->zi_guid == 0 || *end != '\0') { in translate_device()
360 &record->zi_guid) == 0); in translate_device()
369 if (record->zi_timer != 0) { in translate_device()
370 record->zi_cmd = ZINJECT_DELAY_IO; in translate_device()
372 record->zi_cmd = ZINJECT_LABEL_FAULT; in translate_device()
374 record->zi_cmd = ZINJECT_DEVICE_FAULT; in translate_device()
381 record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]); in translate_device()
382 record->zi_end = record->zi_start + VDEV_UBERBLOCK_RING - 1; in translate_device()
385 record->zi_start = offsetof(vdev_label_t, vl_vdev_phys); in translate_device()
386 record->zi_end = record->zi_start + VDEV_PHYS_SIZE - 1; in translate_device()
389 record->zi_start = offsetof(vdev_label_t, vl_pad1); in translate_device()
390 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1; in translate_device()
393 record->zi_start = offsetof(vdev_label_t, vl_be); in translate_device()
394 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1; in translate_device()