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

Lines Matching refs:vcdl

334  * Process the vcdl->vdev_cmd_data[] array to figure out all the unique column
335 * names and their widths. When this function is done, vcdl->uniq_cols,
336 * vcdl->uniq_cols_cnt, and vcdl->uniq_cols_width will be filled in.
339 process_unique_cmd_columns(vdev_cmd_data_list_t *vcdl)
348 for (int i = 0; i < vcdl->count; i++) {
349 data = &vcdl->data[i];
380 for (int j = 0; j < vcdl->count; j++) {
382 data = &vcdl->data[j];
395 vcdl->uniq_cols = uniq_cols;
396 vcdl->uniq_cols_cnt = cnt;
397 vcdl->uniq_cols_width = uniq_cols_width;
608 vdev_cmd_data_list_t *vcdl = cb_vcdl;
622 for (i = 0; i < vcdl->count; i++) {
623 if ((strcmp(vcdl->data[i].path, path) == 0) &&
624 (strcmp(vcdl->data[i].pool, zpool_get_name(zhp)) == 0)) {
631 for (i = 0; i < vcdl->vdev_names_count; i++) {
632 vname = zpool_vdev_name(g_zfs, zhp, nv, vcdl->cb_name_flags);
633 if (strcmp(vcdl->vdev_names[i], vname) == 0) {
642 if (!match && vcdl->vdev_names_count)
648 if (!(vcdl->data = realloc(vcdl->data,
649 sizeof (*vcdl->data) * (vcdl->count + 1))))
652 data = &vcdl->data[vcdl->count];
657 data->cmd = vcdl->cmd;
665 vcdl->count++;
678 * Now that vcdl is populated with our complete list of vdevs, spawn
682 all_pools_for_each_vdev_run_vcdl(vdev_cmd_data_list_t *vcdl)
691 for (int i = 0; i < vcdl->count; i++) {
693 (void *) &vcdl->data[i]);
715 vdev_cmd_data_list_t *vcdl;
716 vcdl = safe_malloc(sizeof (vdev_cmd_data_list_t));
717 vcdl->cmd = cmd;
719 vcdl->vdev_names = vdev_names;
720 vcdl->vdev_names_count = vdev_names_count;
721 vcdl->cb_name_flags = cb_name_flags;
722 vcdl->g_zfs = g_zfs;
726 all_pools_for_each_vdev_gather_cb, vcdl);
729 all_pools_for_each_vdev_run_vcdl(vcdl);
732 * vcdl->data[] now contains all the column names and values for each
736 process_unique_cmd_columns(vcdl);
738 return (vcdl);
745 free_vdev_cmd_data_list(vdev_cmd_data_list_t *vcdl)
747 free(vcdl->uniq_cols);
748 free(vcdl->uniq_cols_width);
750 for (int i = 0; i < vcdl->count; i++) {
751 free(vcdl->data[i].path);
752 free(vcdl->data[i].pool);
753 free(vcdl->data[i].upath);
755 for (int j = 0; j < vcdl->data[i].lines_cnt; j++)
756 free(vcdl->data[i].lines[j]);
758 free(vcdl->data[i].lines);
760 for (int j = 0; j < vcdl->data[i].cols_cnt; j++)
761 free(vcdl->data[i].cols[j]);
763 free(vcdl->data[i].cols);
764 free(vcdl->data[i].vdev_enc_sysfs_path);
766 free(vcdl->data);
767 free(vcdl);