Lines Matching defs:cb
75 zfs_include_snapshots(zfs_handle_t *zhp, callback_data_t *cb)
79 if ((cb->cb_flags & ZFS_ITER_PROP_LISTSNAPS) == 0)
80 return (cb->cb_types & ZFS_TYPE_SNAPSHOT);
93 callback_data_t *cb = data;
95 boolean_t include_snaps = zfs_include_snapshots(zhp, cb);
96 boolean_t include_bmarks = (cb->cb_types & ZFS_TYPE_BOOKMARK);
98 if ((zfs_get_type(zhp) & cb->cb_types) ||
105 if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol,
107 if (cb->cb_proplist) {
108 if ((*cb->cb_proplist) &&
109 !(*cb->cb_proplist)->pl_all)
111 cb->cb_props_table);
113 if (zfs_expand_proplist(zhp, cb->cb_proplist,
114 (cb->cb_flags & ZFS_ITER_RECVD_PROPS),
115 (cb->cb_flags & ZFS_ITER_LITERAL_PROPS))
121 uu_avl_insert(cb->cb_avl, node, idx);
131 if (cb->cb_flags & ZFS_ITER_RECURSE &&
132 ((cb->cb_flags & ZFS_ITER_DEPTH_LIMIT) == 0 ||
133 cb->cb_depth < cb->cb_depth_limit)) {
134 cb->cb_depth++;
143 cb->cb_depth--;
354 callback_data_t cb = {0};
365 cb.cb_sortcol = sortcol;
366 cb.cb_flags = flags;
367 cb.cb_proplist = proplist;
368 cb.cb_types = types;
369 cb.cb_depth_limit = limit;
382 if (cb.cb_proplist && *cb.cb_proplist) {
383 zprop_list_t *p = *cb.cb_proplist;
388 cb.cb_props_table[p->pl_prop] = B_TRUE;
396 cb.cb_props_table[sortcol->sc_prop] = B_TRUE;
401 cb.cb_props_table[ZFS_PROP_ZONED] = B_TRUE;
402 cb.cb_props_table[ZFS_PROP_CREATETXG] = B_TRUE;
404 (void) memset(cb.cb_props_table, B_TRUE,
405 sizeof (cb.cb_props_table));
408 if ((cb.cb_avl = uu_avl_create(avl_pool, NULL, UU_DEFAULT)) == NULL)
415 cb.cb_flags |= ZFS_ITER_RECURSE;
416 ret = zfs_iter_root(g_zfs, zfs_callback, &cb);
442 ret |= zfs_callback(zhp, &cb);
452 for (node = uu_avl_first(cb.cb_avl); node != NULL;
453 node = uu_avl_next(cb.cb_avl, node))
459 if ((walk = uu_avl_walk_start(cb.cb_avl, UU_WALK_ROBUST)) == NULL)
463 uu_avl_remove(cb.cb_avl, node);
469 uu_avl_destroy(cb.cb_avl);