• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/openzfs/cmd/zinject/

Lines Matching defs:record

133 object_from_path(const char *dataset, uint64_t object, zinject_record_t *record)
140 record->zi_objset = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID);
141 record->zi_object = object;
153 zinject_record_t *record)
164 record->zi_start = 0;
165 record->zi_end = -1ULL;
170 record->zi_start = strtoull(range, &end, 10);
174 record->zi_end = record->zi_start + 1;
176 record->zi_end = strtoull(end + 1, &end, 10);
205 record->zi_start = record->zi_object * sizeof (dnode_phys_t);
206 record->zi_end = record->zi_start + sizeof (dnode_phys_t);
207 record->zi_object = 0;
211 record->zi_level = level;
218 int level, zinject_record_t *record, char *poolname, char *dataset)
237 record->zi_type = 0;
240 record->zi_type = DMU_OT_OBJECT_DIRECTORY;
243 record->zi_type = DMU_OT_OBJECT_ARRAY;
246 record->zi_type = DMU_OT_PACKED_NVLIST;
249 record->zi_type = DMU_OT_BPOBJ;
252 record->zi_type = DMU_OT_SPACE_MAP;
255 record->zi_type = DMU_OT_ERROR_LOG;
276 if (object_from_path(dataset, statbuf.st_ino, record) != 0)
279 ziprintf("raw objset: %llu\n", record->zi_objset);
280 ziprintf("raw object: %llu\n", record->zi_object);
285 if (initialize_range(type, level, (char *)range, record) != 0)
288 ziprintf(" objset: %llu\n", record->zi_objset);
289 ziprintf(" object: %llu\n", record->zi_object);
290 if (record->zi_start == 0 &&
291 record->zi_end == -1ULL)
294 ziprintf(" range: [%llu, %llu]\n", record->zi_start,
295 record->zi_end);
311 translate_raw(const char *str, zinject_record_t *record)
317 if (sscanf(str, "%llx:%llx:%x:%llx", (u_longlong_t *)&record->zi_objset,
318 (u_longlong_t *)&record->zi_object, &record->zi_level,
319 (u_longlong_t *)&record->zi_start) != 4) {
325 record->zi_end = record->zi_start;
332 zinject_record_t *record)
340 * Given a device name or GUID, create an appropriate injection record
346 record->zi_guid = strtoull(device, &end, 0);
347 if (record->zi_guid == 0 || *end != '\0') {
358 &record->zi_guid) == 0);
367 if (record->zi_timer != 0) {
368 record->zi_cmd = ZINJECT_DELAY_IO;
370 record->zi_cmd = ZINJECT_LABEL_FAULT;
372 record->zi_cmd = ZINJECT_DEVICE_FAULT;
379 record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]);
380 record->zi_end = record->zi_start + VDEV_UBERBLOCK_RING - 1;
383 record->zi_start = offsetof(vdev_label_t, vl_vdev_phys);
384 record->zi_end = record->zi_start + VDEV_PHYS_SIZE - 1;
387 record->zi_start = offsetof(vdev_label_t, vl_pad1);
388 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1;
391 record->zi_start = offsetof(vdev_label_t, vl_be);
392 record->zi_end = record->zi_start + VDEV_PAD_SIZE - 1;