Print this page
4171 clean up spa_feature_*() interfaces
4172 implement extensible_dataset feature for use by other zpool features
Reviewed by: Max Grossman <max.grossman@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
*** 561,580 ****
}
static int
verify_spacemap_refcounts(spa_t *spa)
{
! int expected_refcount, actual_refcount;
! expected_refcount = spa_feature_get_refcount(spa,
! &spa_feature_table[SPA_FEATURE_SPACEMAP_HISTOGRAM]);
actual_refcount = get_dtl_refcount(spa->spa_root_vdev);
actual_refcount += get_metaslab_refcount(spa->spa_root_vdev);
if (expected_refcount != actual_refcount) {
! (void) printf("space map refcount mismatch: expected %d != "
! "actual %d\n", expected_refcount, actual_refcount);
return (2);
}
return (0);
}
--- 561,584 ----
}
static int
verify_spacemap_refcounts(spa_t *spa)
{
! uint64_t expected_refcount = 0;
! uint64_t actual_refcount;
! (void) feature_get_refcount(spa,
! &spa_feature_table[SPA_FEATURE_SPACEMAP_HISTOGRAM],
! &expected_refcount);
actual_refcount = get_dtl_refcount(spa->spa_root_vdev);
actual_refcount += get_metaslab_refcount(spa->spa_root_vdev);
if (expected_refcount != actual_refcount) {
! (void) printf("space map refcount mismatch: expected %lld != "
! "actual %lld\n",
! (longlong_t)expected_refcount,
! (longlong_t)actual_refcount);
return (2);
}
return (0);
}
*** 672,683 ****
metaslab_unload(msp);
mutex_exit(&msp->ms_lock);
}
if (dump_opt['m'] > 1 && sm != NULL &&
! spa_feature_is_active(spa,
! &spa_feature_table[SPA_FEATURE_SPACEMAP_HISTOGRAM])) {
/*
* The space map histogram represents free space in chunks
* of sm_shift (i.e. bucket 0 refers to 2^sm_shift).
*/
(void) printf("\tOn-disk histogram:\n");
--- 676,686 ----
metaslab_unload(msp);
mutex_exit(&msp->ms_lock);
}
if (dump_opt['m'] > 1 && sm != NULL &&
! spa_feature_is_active(spa, SPA_FEATURE_SPACEMAP_HISTOGRAM)) {
/*
* The space map histogram represents free space in chunks
* of sm_shift (i.e. bucket 0 refers to 2^sm_shift).
*/
(void) printf("\tOn-disk histogram:\n");
*** 2464,2475 ****
count_block_cb, &zcb, NULL);
if (spa_version(spa) >= SPA_VERSION_DEADLISTS) {
(void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj,
count_block_cb, &zcb, NULL);
}
! if (spa_feature_is_active(spa,
! &spa_feature_table[SPA_FEATURE_ASYNC_DESTROY])) {
VERIFY3U(0, ==, bptree_iterate(spa->spa_meta_objset,
spa->spa_dsl_pool->dp_bptree_obj, B_FALSE, count_block_cb,
&zcb, NULL));
}
--- 2467,2477 ----
count_block_cb, &zcb, NULL);
if (spa_version(spa) >= SPA_VERSION_DEADLISTS) {
(void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj,
count_block_cb, &zcb, NULL);
}
! if (spa_feature_is_active(spa, SPA_FEATURE_ASYNC_DESTROY)) {
VERIFY3U(0, ==, bptree_iterate(spa->spa_meta_objset,
spa->spa_dsl_pool->dp_bptree_obj, B_FALSE, count_block_cb,
&zcb, NULL));
}
*** 2791,2801 ****
dump_bpobj(&spa->spa_dsl_pool->dp_free_bpobj,
"Pool snapshot frees", 0);
}
if (spa_feature_is_active(spa,
! &spa_feature_table[SPA_FEATURE_ASYNC_DESTROY])) {
dump_bptree(spa->spa_meta_objset,
spa->spa_dsl_pool->dp_bptree_obj,
"Pool dataset frees");
}
dump_dtl(spa->spa_root_vdev, 0);
--- 2793,2803 ----
dump_bpobj(&spa->spa_dsl_pool->dp_free_bpobj,
"Pool snapshot frees", 0);
}
if (spa_feature_is_active(spa,
! SPA_FEATURE_ASYNC_DESTROY)) {
dump_bptree(spa->spa_meta_objset,
spa->spa_dsl_pool->dp_bptree_obj,
"Pool dataset frees");
}
dump_dtl(spa->spa_root_vdev, 0);