Print this page
4101 metaslab_debug should allow for fine-grained control
4102 space_maps should store more information about themselves
4103 space map object blocksize should be increased
4104 ::spa_space no longer works
4105 removing a mirrored log device results in a leaked object
4106 asynchronously load metaslab
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Sebastien Roy <seb@delphix.com>


 266                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_NOT_PRESENT, 1);
 267 
 268         if (vd->vdev_isspare)
 269                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_IS_SPARE, 1);
 270 
 271         if (!(flags & (VDEV_CONFIG_SPARE | VDEV_CONFIG_L2CACHE)) &&
 272             vd == vd->vdev_top) {
 273                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_METASLAB_ARRAY,
 274                     vd->vdev_ms_array);
 275                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_METASLAB_SHIFT,
 276                     vd->vdev_ms_shift);
 277                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_ASHIFT, vd->vdev_ashift);
 278                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_ASIZE,
 279                     vd->vdev_asize);
 280                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_IS_LOG, vd->vdev_islog);
 281                 if (vd->vdev_removing)
 282                         fnvlist_add_uint64(nv, ZPOOL_CONFIG_REMOVING,
 283                             vd->vdev_removing);
 284         }
 285 
 286         if (vd->vdev_dtl_smo.smo_object != 0)
 287                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_DTL,
 288                     vd->vdev_dtl_smo.smo_object);

 289 
 290         if (vd->vdev_crtxg)
 291                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_CREATE_TXG, vd->vdev_crtxg);
 292 
 293         if (getstats) {
 294                 vdev_stat_t vs;
 295                 pool_scan_stat_t ps;
 296 
 297                 vdev_get_stats(vd, &vs);
 298                 fnvlist_add_uint64_array(nv, ZPOOL_CONFIG_VDEV_STATS,
 299                     (uint64_t *)&vs, sizeof (vs) / sizeof (uint64_t));
 300 
 301                 /* provide either current or previous scan information */
 302                 if (spa_scan_get_stats(spa, &ps) == 0) {
 303                         fnvlist_add_uint64_array(nv,
 304                             ZPOOL_CONFIG_SCAN_STATS, (uint64_t *)&ps,
 305                             sizeof (pool_scan_stat_t) / sizeof (uint64_t));
 306                 }
 307         }
 308 




 266                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_NOT_PRESENT, 1);
 267 
 268         if (vd->vdev_isspare)
 269                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_IS_SPARE, 1);
 270 
 271         if (!(flags & (VDEV_CONFIG_SPARE | VDEV_CONFIG_L2CACHE)) &&
 272             vd == vd->vdev_top) {
 273                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_METASLAB_ARRAY,
 274                     vd->vdev_ms_array);
 275                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_METASLAB_SHIFT,
 276                     vd->vdev_ms_shift);
 277                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_ASHIFT, vd->vdev_ashift);
 278                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_ASIZE,
 279                     vd->vdev_asize);
 280                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_IS_LOG, vd->vdev_islog);
 281                 if (vd->vdev_removing)
 282                         fnvlist_add_uint64(nv, ZPOOL_CONFIG_REMOVING,
 283                             vd->vdev_removing);
 284         }
 285 
 286         if (vd->vdev_dtl_sm != NULL) {
 287                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_DTL,
 288                     space_map_object(vd->vdev_dtl_sm));
 289         }
 290 
 291         if (vd->vdev_crtxg)
 292                 fnvlist_add_uint64(nv, ZPOOL_CONFIG_CREATE_TXG, vd->vdev_crtxg);
 293 
 294         if (getstats) {
 295                 vdev_stat_t vs;
 296                 pool_scan_stat_t ps;
 297 
 298                 vdev_get_stats(vd, &vs);
 299                 fnvlist_add_uint64_array(nv, ZPOOL_CONFIG_VDEV_STATS,
 300                     (uint64_t *)&vs, sizeof (vs) / sizeof (uint64_t));
 301 
 302                 /* provide either current or previous scan information */
 303                 if (spa_scan_get_stats(spa, &ps) == 0) {
 304                         fnvlist_add_uint64_array(nv,
 305                             ZPOOL_CONFIG_SCAN_STATS, (uint64_t *)&ps,
 306                             sizeof (pool_scan_stat_t) / sizeof (uint64_t));
 307                 }
 308         }
 309