Changeset View
Changeset View
Standalone View
Standalone View
head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
const char cmdname[] = "zdb"; | const char cmdname[] = "zdb"; | ||||
uint8_t dump_opt[256]; | uint8_t dump_opt[256]; | ||||
typedef void object_viewer_t(objset_t *, uint64_t, void *data, size_t size); | typedef void object_viewer_t(objset_t *, uint64_t, void *data, size_t size); | ||||
extern void dump_intent_log(zilog_t *); | extern void dump_intent_log(zilog_t *); | ||||
uint64_t *zopt_object = NULL; | static uint64_t *zopt_object = NULL; | ||||
int zopt_objects = 0; | static int zopt_objects = 0; | ||||
libzfs_handle_t *g_zfs; | static libzfs_handle_t *g_zfs; | ||||
uint64_t max_inflight = 1000; | static uint64_t max_inflight = 1000; | ||||
/* | /* | ||||
* These libumem hooks provide a reasonable set of defaults for the allocator's | * These libumem hooks provide a reasonable set of defaults for the allocator's | ||||
* debugging facilities. | * debugging facilities. | ||||
*/ | */ | ||||
const char * | const char * | ||||
_umem_debug_init() | _umem_debug_init() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,378 Lines • ▼ Show 20 Lines | dump_deadlist(dsl_deadlist_t *dl) | ||||
/* force the tree to be loaded */ | /* force the tree to be loaded */ | ||||
dsl_deadlist_space_range(dl, 0, UINT64_MAX, &unused, &unused, &unused); | dsl_deadlist_space_range(dl, 0, UINT64_MAX, &unused, &unused, &unused); | ||||
for (dle = avl_first(&dl->dl_tree); dle; | for (dle = avl_first(&dl->dl_tree); dle; | ||||
dle = AVL_NEXT(&dl->dl_tree, dle)) { | dle = AVL_NEXT(&dl->dl_tree, dle)) { | ||||
if (dump_opt['d'] >= 5) { | if (dump_opt['d'] >= 5) { | ||||
char buf[128]; | char buf[128]; | ||||
(void) snprintf(buf, sizeof (buf), "mintxg %llu -> ", | (void) snprintf(buf, sizeof (buf), "mintxg %llu -> " | ||||
(longlong_t)dle->dle_mintxg, | "obj %llu", (longlong_t)dle->dle_mintxg, | ||||
(longlong_t)dle->dle_bpobj.bpo_object); | (longlong_t)dle->dle_bpobj.bpo_object); | ||||
dump_bpobj(&dle->dle_bpobj, buf, 0); | dump_bpobj(&dle->dle_bpobj, buf, 0); | ||||
} else { | } else { | ||||
(void) printf("mintxg %llu -> obj %llu\n", | (void) printf("mintxg %llu -> obj %llu\n", | ||||
(longlong_t)dle->dle_mintxg, | (longlong_t)dle->dle_mintxg, | ||||
(longlong_t)dle->dle_bpobj.bpo_object); | (longlong_t)dle->dle_bpobj.bpo_object); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
static avl_tree_t idx_tree; | static avl_tree_t idx_tree; | ||||
static avl_tree_t domain_tree; | static avl_tree_t domain_tree; | ||||
static boolean_t fuid_table_loaded; | static boolean_t fuid_table_loaded; | ||||
static boolean_t sa_loaded; | static boolean_t sa_loaded; | ||||
▲ Show 20 Lines • Show All 2,199 Lines • Show Last 20 Lines |