Lines Matching defs:record

150     zinject_record_t *record)
168 record->zi_objset = dmu_objset_id(os);
169 record->zi_object = statbuf->st_ino;
181 zinject_record_t *record)
197 record->zi_start = 0;
198 record->zi_end = -1ULL;
203 record->zi_start = strtoull(range, &end, 10);
207 record->zi_end = record->zi_start + 1;
209 record->zi_end = strtoull(end + 1, &end, 10);
236 record->zi_start = record->zi_object * sizeof (dnode_phys_t);
237 record->zi_end = record->zi_start + sizeof (dnode_phys_t);
238 record->zi_object = 0;
253 if (record->zi_object == 0) {
256 err = dnode_hold(os, record->zi_object, FTAG, &dn);
260 (u_longlong_t)record->zi_object);
272 if (record->zi_start != 0 || record->zi_end != -1ULL) {
273 record->zi_start >>= dn->dn_datablkshift;
274 record->zi_end >>= dn->dn_datablkshift;
281 record->zi_level = level;
284 record->zi_start, record->zi_end);
292 if (record->zi_start != 0 || record->zi_end != 0) {
296 record->zi_start >>= shift;
297 record->zi_end >>= shift;
316 int level, zinject_record_t *record, char *poolname, char *dataset)
335 record->zi_type = 0;
338 record->zi_type = DMU_OT_OBJECT_DIRECTORY;
341 record->zi_type = DMU_OT_OBJECT_ARRAY;
344 record->zi_type = DMU_OT_PACKED_NVLIST;
347 record->zi_type = DMU_OT_BPOBJ;
350 record->zi_type = DMU_OT_SPACE_MAP;
353 record->zi_type = DMU_OT_ERROR_LOG;
374 if (object_from_path(dataset, path, &statbuf, record) != 0)
377 ziprintf("raw objset: %llu\n", record->zi_objset);
378 ziprintf("raw object: %llu\n", record->zi_object);
383 if (calculate_range(dataset, type, level, (char *)range, record) != 0)
386 ziprintf(" objset: %llu\n", record->zi_objset);
387 ziprintf(" object: %llu\n", record->zi_object);
388 if (record->zi_start == 0 &&
389 record->zi_end == -1ULL)
392 ziprintf(" range: [%llu, %llu]\n", record->zi_start,
393 record->zi_end);
410 translate_raw(const char *str, zinject_record_t *record)
416 if (sscanf(str, "%llx:%llx:%x:%llx", (u_longlong_t *)&record->zi_objset,
417 (u_longlong_t *)&record->zi_object, &record->zi_level,
418 (u_longlong_t *)&record->zi_start) != 4) {
424 record->zi_end = record->zi_start;
431 zinject_record_t *record)
439 * Given a device name or GUID, create an appropriate injection record
445 record->zi_guid = strtoull(device, &end, 16);
446 if (record->zi_guid == 0 || *end != '\0') {
456 &record->zi_guid) == 0);
465 if (record->zi_timer != 0) {
466 record->zi_cmd = ZINJECT_DELAY_IO;
468 record->zi_cmd = ZINJECT_LABEL_FAULT;
470 record->zi_cmd = ZINJECT_DEVICE_FAULT;
475 record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]);
476 record->zi_end = record->zi_start + VDEV_UBERBLOCK_RING - 1;
479 record->zi_start = offsetof(vdev_label_t, vl_vdev_phys);
480 record->zi_end = record->zi_start + VDEV_PHYS_SIZE - 1;
483 record->zi_start = offsetof(vdev_label_t, vl_pad1);
484 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1;
487 record->zi_start = offsetof(vdev_label_t, vl_pad2);
488 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1;