Lines Matching refs:cb

76 zfs_include_snapshots(zfs_handle_t *zhp, callback_data_t *cb)
80 if ((cb->cb_flags & ZFS_ITER_PROP_LISTSNAPS) == 0)
81 return (cb->cb_types & ZFS_TYPE_SNAPSHOT);
94 callback_data_t *cb = data;
96 boolean_t include_snaps = zfs_include_snapshots(zhp, cb);
97 boolean_t include_bmarks = (cb->cb_types & ZFS_TYPE_BOOKMARK);
99 if ((zfs_get_type(zhp) & cb->cb_types) ||
106 if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol,
108 if (cb->cb_proplist) {
109 if ((*cb->cb_proplist) &&
110 !(*cb->cb_proplist)->pl_all)
112 cb->cb_props_table);
114 if (zfs_expand_proplist(zhp, cb->cb_proplist,
115 (cb->cb_flags & ZFS_ITER_RECVD_PROPS),
116 (cb->cb_flags & ZFS_ITER_LITERAL_PROPS))
122 uu_avl_insert(cb->cb_avl, node, idx);
132 if (cb->cb_flags & ZFS_ITER_RECURSE &&
133 ((cb->cb_flags & ZFS_ITER_DEPTH_LIMIT) == 0 ||
134 cb->cb_depth < cb->cb_depth_limit)) {
135 cb->cb_depth++;
141 (cb->cb_flags & ZFS_ITER_SIMPLE) != 0, zfs_callback,
146 cb->cb_depth--;
378 callback_data_t cb = {0};
389 cb.cb_sortcol = sortcol;
390 cb.cb_flags = flags;
391 cb.cb_proplist = proplist;
392 cb.cb_types = types;
393 cb.cb_depth_limit = limit;
406 if (cb.cb_proplist && *cb.cb_proplist) {
407 zprop_list_t *p = *cb.cb_proplist;
412 cb.cb_props_table[p->pl_prop] = B_TRUE;
420 cb.cb_props_table[sortcol->sc_prop] = B_TRUE;
425 cb.cb_props_table[ZFS_PROP_ZONED] = B_TRUE;
426 cb.cb_props_table[ZFS_PROP_CREATETXG] = B_TRUE;
428 (void) memset(cb.cb_props_table, B_TRUE,
429 sizeof (cb.cb_props_table));
432 if ((cb.cb_avl = uu_avl_create(avl_pool, NULL, UU_DEFAULT)) == NULL)
439 cb.cb_flags |= ZFS_ITER_RECURSE;
440 ret = zfs_iter_root(g_zfs, zfs_callback, &cb);
466 ret |= zfs_callback(zhp, &cb);
476 for (node = uu_avl_first(cb.cb_avl); node != NULL;
477 node = uu_avl_next(cb.cb_avl, node))
483 if ((walk = uu_avl_walk_start(cb.cb_avl, UU_WALK_ROBUST)) == NULL)
487 uu_avl_remove(cb.cb_avl, node);
493 uu_avl_destroy(cb.cb_avl);