zdb.c (e690fb27a7d1483f052505e1ff373d205f9dee99) | zdb.c (1b912ec7100c10e7243bf0879af0fe580e08c73d) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 1002 unchanged lines hidden (view full) --- 1011 if (BP_GET_LEVEL(bp) > 0) { 1012 uint32_t flags = ARC_WAIT; 1013 int i; 1014 blkptr_t *cbp; 1015 int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT; 1016 arc_buf_t *buf; 1017 uint64_t fill = 0; 1018 | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 1002 unchanged lines hidden (view full) --- 1011 if (BP_GET_LEVEL(bp) > 0) { 1012 uint32_t flags = ARC_WAIT; 1013 int i; 1014 blkptr_t *cbp; 1015 int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT; 1016 arc_buf_t *buf; 1017 uint64_t fill = 0; 1018 |
1019 err = arc_read_nolock(NULL, spa, bp, arc_getbuf_func, &buf, | 1019 err = arc_read(NULL, spa, bp, arc_getbuf_func, &buf, |
1020 ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); 1021 if (err) 1022 return (err); 1023 ASSERT(buf->b_data); 1024 1025 /* recursively visit blocks below this */ 1026 cbp = buf->b_data; 1027 for (i = 0; i < epb; i++, cbp++) { --- 1040 unchanged lines hidden (view full) --- 2068 (u_longlong_t)zb->zb_object, 2069 (u_longlong_t)zb->zb_level, 2070 (u_longlong_t)zb->zb_blkid, 2071 blkbuf); 2072 } 2073 mutex_exit(&spa->spa_scrub_lock); 2074} 2075 | 1020 ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); 1021 if (err) 1022 return (err); 1023 ASSERT(buf->b_data); 1024 1025 /* recursively visit blocks below this */ 1026 cbp = buf->b_data; 1027 for (i = 0; i < epb; i++, cbp++) { --- 1040 unchanged lines hidden (view full) --- 2068 (u_longlong_t)zb->zb_object, 2069 (u_longlong_t)zb->zb_level, 2070 (u_longlong_t)zb->zb_blkid, 2071 blkbuf); 2072 } 2073 mutex_exit(&spa->spa_scrub_lock); 2074} 2075 |
2076/* ARGSUSED */ | |
2077static int | 2076static int |
2078zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, | 2077zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, |
2079 const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) 2080{ 2081 zdb_cb_t *zcb = arg; 2082 char blkbuf[BP_SPRINTF_LEN]; 2083 dmu_object_type_t type; 2084 boolean_t is_metadata; 2085 2086 if (bp == NULL) --- 384 unchanged lines hidden (view full) --- 2471 uint64_t zdde_ref_psize; 2472 uint64_t zdde_ref_dsize; 2473 avl_node_t zdde_node; 2474} zdb_ddt_entry_t; 2475 2476/* ARGSUSED */ 2477static int 2478zdb_ddt_add_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, | 2078 const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) 2079{ 2080 zdb_cb_t *zcb = arg; 2081 char blkbuf[BP_SPRINTF_LEN]; 2082 dmu_object_type_t type; 2083 boolean_t is_metadata; 2084 2085 if (bp == NULL) --- 384 unchanged lines hidden (view full) --- 2470 uint64_t zdde_ref_psize; 2471 uint64_t zdde_ref_dsize; 2472 avl_node_t zdde_node; 2473} zdb_ddt_entry_t; 2474 2475/* ARGSUSED */ 2476static int 2477zdb_ddt_add_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, |
2479 arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) | 2478 const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) |
2480{ 2481 avl_tree_t *t = arg; 2482 avl_index_t where; 2483 zdb_ddt_entry_t *zdde, zdde_search; 2484 2485 if (bp == NULL) 2486 return (0); 2487 --- 819 unchanged lines hidden --- | 2479{ 2480 avl_tree_t *t = arg; 2481 avl_index_t where; 2482 zdb_ddt_entry_t *zdde, zdde_search; 2483 2484 if (bp == NULL) 2485 return (0); 2486 --- 819 unchanged lines hidden --- |