Lines Matching defs:zvp

160 	zfs_vertex_t *zvp = zfs_alloc(hdl, sizeof (zfs_vertex_t));
162 if (zvp == NULL)
167 (void) strlcpy(zvp->zv_dataset, dataset, sizeof (zvp->zv_dataset));
169 if ((zvp->zv_edges = zfs_alloc(hdl,
171 free(zvp);
175 zvp->zv_edgealloc = MIN_EDGECOUNT;
177 return (zvp);
184 zfs_vertex_destroy(zfs_vertex_t *zvp)
188 for (i = 0; i < zvp->zv_edgecount; i++)
189 zfs_edge_destroy(zvp->zv_edges[i]);
191 free(zvp->zv_edges);
192 free(zvp);
199 zfs_vertex_add_edge(libzfs_handle_t *hdl, zfs_vertex_t *zvp,
204 if (zvp->zv_edgecount == zvp->zv_edgealloc) {
207 if ((ptr = zfs_realloc(hdl, zvp->zv_edges,
208 zvp->zv_edgealloc * sizeof (void *),
209 zvp->zv_edgealloc * 2 * sizeof (void *))) == NULL)
212 zvp->zv_edges = ptr;
213 zvp->zv_edgealloc *= 2;
219 zvp->zv_edges[zvp->zv_edgecount++] = zep;
241 zfs_vertex_sort_edges(zfs_vertex_t *zvp)
243 if (zvp->zv_edgecount == 0)
246 qsort(zvp->zv_edges, zvp->zv_edgecount, sizeof (void *),
323 zfs_vertex_t *zvp;
325 for (zvp = zgp->zg_hash[idx]; zvp != NULL; zvp = zvp->zv_next) {
326 if (strcmp(zvp->zv_dataset, dataset) == 0) {
327 if (zvp->zv_txg == 0)
328 zvp->zv_txg = txg;
329 return (zvp);
333 if ((zvp = zfs_vertex_create(hdl, dataset)) == NULL)
336 zvp->zv_next = zgp->zg_hash[idx];
337 zvp->zv_txg = txg;
338 zgp->zg_hash[idx] = zvp;
341 return (zvp);
409 zfs_vertex_t *zvp;
414 zvp = zfs_graph_lookup(hdl, zgp, dataset, 0);
415 if (zvp == NULL)
417 if (zvp->zv_visited == VISIT_SEEN)
488 zvp->zv_visited = VISIT_SEEN;
643 zfs_vertex_t *zvp;
654 if ((zvp = zfs_graph_lookup(hdl, zgp, dataset, 0)) == NULL) {
661 if (topo_sort(hdl, allowrecursion, *result, count, zvp) != 0) {