Deleted Added
full compact
spa.c (267992) spa.c (268075)
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

--- 1868 unchanged lines hidden (view full) ---

1877 zio_data_buf_free(zio->io_data, zio->io_size);
1878}
1879
1880/*ARGSUSED*/
1881static int
1882spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
1883 const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg)
1884{
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

--- 1868 unchanged lines hidden (view full) ---

1877 zio_data_buf_free(zio->io_data, zio->io_size);
1878}
1879
1880/*ARGSUSED*/
1881static int
1882spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
1883 const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg)
1884{
1885 if (!BP_IS_HOLE(bp)) {
1885 if (!BP_IS_HOLE(bp) && !BP_IS_EMBEDDED(bp)) {
1886 zio_t *rio = arg;
1887 size_t size = BP_GET_PSIZE(bp);
1888 void *data = zio_data_buf_alloc(size);
1889
1890 zio_nowait(zio_read(rio, spa, bp, data, size,
1891 spa_load_verify_done, rio->io_private, ZIO_PRIORITY_SCRUB,
1892 ZIO_FLAG_SPECULATIVE | ZIO_FLAG_CANFAIL |
1893 ZIO_FLAG_SCRUB | ZIO_FLAG_RAW, zb));

--- 531 unchanged lines hidden (view full) ---

2425 return (spa_vdev_err(rvd,
2426 VDEV_AUX_CORRUPT_DATA, EIO));
2427 }
2428 }
2429 }
2430
2431 if (spa_feature_is_active(spa, SPA_FEATURE_ENABLED_TXG)) {
2432 if (spa_dir_prop(spa, DMU_POOL_FEATURE_ENABLED_TXG,
1886 zio_t *rio = arg;
1887 size_t size = BP_GET_PSIZE(bp);
1888 void *data = zio_data_buf_alloc(size);
1889
1890 zio_nowait(zio_read(rio, spa, bp, data, size,
1891 spa_load_verify_done, rio->io_private, ZIO_PRIORITY_SCRUB,
1892 ZIO_FLAG_SPECULATIVE | ZIO_FLAG_CANFAIL |
1893 ZIO_FLAG_SCRUB | ZIO_FLAG_RAW, zb));

--- 531 unchanged lines hidden (view full) ---

2425 return (spa_vdev_err(rvd,
2426 VDEV_AUX_CORRUPT_DATA, EIO));
2427 }
2428 }
2429 }
2430
2431 if (spa_feature_is_active(spa, SPA_FEATURE_ENABLED_TXG)) {
2432 if (spa_dir_prop(spa, DMU_POOL_FEATURE_ENABLED_TXG,
2433 &spa->spa_feat_enabled_txg_obj) != 0) {
2433 &spa->spa_feat_enabled_txg_obj) != 0)
2434 return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO));
2434 return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO));
2435 }
2436 }
2437
2438 spa->spa_is_initializing = B_TRUE;
2439 error = dsl_pool_open(spa->spa_dsl_pool);
2440 spa->spa_is_initializing = B_FALSE;
2441 if (error != 0)
2442 return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO));
2443

--- 3086 unchanged lines hidden (view full) ---

5530 spa_vdev_remove_aux(spa->spa_l2cache.sav_config,
5531 ZPOOL_CONFIG_L2CACHE, l2cache, nl2cache, nv);
5532 spa_load_l2cache(spa);
5533 spa->spa_l2cache.sav_sync = B_TRUE;
5534 } else if (vd != NULL && vd->vdev_islog) {
5535 ASSERT(!locked);
5536 ASSERT(vd == vd->vdev_top);
5537
2435 }
2436
2437 spa->spa_is_initializing = B_TRUE;
2438 error = dsl_pool_open(spa->spa_dsl_pool);
2439 spa->spa_is_initializing = B_FALSE;
2440 if (error != 0)
2441 return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO));
2442

--- 3086 unchanged lines hidden (view full) ---

5529 spa_vdev_remove_aux(spa->spa_l2cache.sav_config,
5530 ZPOOL_CONFIG_L2CACHE, l2cache, nl2cache, nv);
5531 spa_load_l2cache(spa);
5532 spa->spa_l2cache.sav_sync = B_TRUE;
5533 } else if (vd != NULL && vd->vdev_islog) {
5534 ASSERT(!locked);
5535 ASSERT(vd == vd->vdev_top);
5536
5538 /*
5539 * XXX - Once we have bp-rewrite this should
5540 * become the common case.
5541 */
5542
5543 mg = vd->vdev_mg;
5544
5545 /*
5546 * Stop allocating from this vdev.
5547 */
5548 metaslab_group_passivate(mg);
5549
5550 /*

--- 1215 unchanged lines hidden (view full) ---

6766 spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
6767
6768 /*
6769 * This should only be called for a non-faulted pool, and since a
6770 * future version would result in an unopenable pool, this shouldn't be
6771 * possible.
6772 */
6773 ASSERT(SPA_VERSION_IS_SUPPORTED(spa->spa_uberblock.ub_version));
5537 mg = vd->vdev_mg;
5538
5539 /*
5540 * Stop allocating from this vdev.
5541 */
5542 metaslab_group_passivate(mg);
5543
5544 /*

--- 1215 unchanged lines hidden (view full) ---

6760 spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
6761
6762 /*
6763 * This should only be called for a non-faulted pool, and since a
6764 * future version would result in an unopenable pool, this shouldn't be
6765 * possible.
6766 */
6767 ASSERT(SPA_VERSION_IS_SUPPORTED(spa->spa_uberblock.ub_version));
6774 ASSERT(version >= spa->spa_uberblock.ub_version);
6768 ASSERT3U(version, >=, spa->spa_uberblock.ub_version);
6775
6776 spa->spa_uberblock.ub_version = version;
6777 vdev_config_dirty(spa->spa_root_vdev);
6778
6779 spa_config_exit(spa, SCL_ALL, FTAG);
6780
6781 txg_wait_synced(spa_get_dsl(spa), 0);
6782}

--- 99 unchanged lines hidden ---
6769
6770 spa->spa_uberblock.ub_version = version;
6771 vdev_config_dirty(spa->spa_root_vdev);
6772
6773 spa_config_exit(spa, SCL_ALL, FTAG);
6774
6775 txg_wait_synced(spa_get_dsl(spa), 0);
6776}

--- 99 unchanged lines hidden ---