Lines Matching full:record

133 object_from_path(const char *dataset, uint64_t object, zinject_record_t *record)  in object_from_path()  argument
140 record->zi_objset = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID); in object_from_path()
141 record->zi_object = object; in object_from_path()
153 zinject_record_t *record) in initialize_range() argument
164 record->zi_start = 0; in initialize_range()
165 record->zi_end = -1ULL; in initialize_range()
170 record->zi_start = strtoull(range, &end, 10); in initialize_range()
174 record->zi_end = record->zi_start + 1; in initialize_range()
176 record->zi_end = strtoull(end + 1, &end, 10); in initialize_range()
206 record->zi_start = record->zi_object * sizeof (dnode_phys_t); in initialize_range()
207 record->zi_end = record->zi_start + sizeof (dnode_phys_t); in initialize_range()
208 record->zi_object = 0; in initialize_range()
212 record->zi_level = level; in initialize_range()
219 int level, zinject_record_t *record, char *poolname, char *dataset) in translate_record() argument
238 record->zi_type = 0; in translate_record()
241 record->zi_type = DMU_OT_OBJECT_DIRECTORY; in translate_record()
244 record->zi_type = DMU_OT_OBJECT_ARRAY; in translate_record()
247 record->zi_type = DMU_OT_PACKED_NVLIST; in translate_record()
250 record->zi_type = DMU_OT_BPOBJ; in translate_record()
253 record->zi_type = DMU_OT_SPACE_MAP; in translate_record()
256 record->zi_type = DMU_OT_ERROR_LOG; in translate_record()
277 if (object_from_path(dataset, statbuf.st_ino, record) != 0) in translate_record()
280 ziprintf("raw objset: %llu\n", record->zi_objset); in translate_record()
281 ziprintf("raw object: %llu\n", record->zi_object); in translate_record()
286 if (initialize_range(type, level, (char *)range, record) != 0) in translate_record()
289 ziprintf(" objset: %llu\n", record->zi_objset); in translate_record()
290 ziprintf(" object: %llu\n", record->zi_object); in translate_record()
291 if (record->zi_start == 0 && in translate_record()
292 record->zi_end == -1ULL) in translate_record()
295 ziprintf(" range: [%llu, %llu]\n", record->zi_start, in translate_record()
296 record->zi_end); in translate_record()
312 translate_raw(const char *str, zinject_record_t *record) in translate_raw() argument
318 if (sscanf(str, "%llx:%llx:%x:%llx", (u_longlong_t *)&record->zi_objset, in translate_raw()
319 (u_longlong_t *)&record->zi_object, &record->zi_level, in translate_raw()
320 (u_longlong_t *)&record->zi_start) != 4) { in translate_raw()
326 record->zi_end = record->zi_start; in translate_raw()
333 zinject_record_t *record) in translate_device() argument
341 * Given a device name or GUID, create an appropriate injection record in translate_device()
347 record->zi_guid = strtoull(device, &end, 0); in translate_device()
348 if (record->zi_guid == 0 || *end != '\0') { in translate_device()
359 &record->zi_guid) == 0); in translate_device()
368 if (record->zi_timer != 0) { in translate_device()
369 record->zi_cmd = ZINJECT_DELAY_IO; in translate_device()
371 record->zi_cmd = ZINJECT_LABEL_FAULT; in translate_device()
373 record->zi_cmd = ZINJECT_DEVICE_FAULT; in translate_device()
380 record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]); in translate_device()
381 record->zi_end = record->zi_start + VDEV_UBERBLOCK_RING - 1; in translate_device()
384 record->zi_start = offsetof(vdev_label_t, vl_vdev_phys); in translate_device()
385 record->zi_end = record->zi_start + VDEV_PHYS_SIZE - 1; in translate_device()
388 record->zi_start = offsetof(vdev_label_t, vl_pad1); in translate_device()
389 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1; in translate_device()
392 record->zi_start = offsetof(vdev_label_t, vl_be); in translate_device()
393 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1; in translate_device()