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

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

1272 txg_sync_stop(spa->spa_dsl_pool);
1273 spa->spa_sync_on = B_FALSE;
1274 }
1275
1276 /*
1277 * Wait for any outstanding async I/O to complete.
1278 */
1279 if (spa->spa_async_zio_root != NULL) {
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

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

1272 txg_sync_stop(spa->spa_dsl_pool);
1273 spa->spa_sync_on = B_FALSE;
1274 }
1275
1276 /*
1277 * Wait for any outstanding async I/O to complete.
1278 */
1279 if (spa->spa_async_zio_root != NULL) {
1280 (void) zio_wait(spa->spa_async_zio_root);
1280 for (int i = 0; i < max_ncpus; i++)
1281 (void) zio_wait(spa->spa_async_zio_root[i]);
1282 kmem_free(spa->spa_async_zio_root, max_ncpus * sizeof (void *));
1281 spa->spa_async_zio_root = NULL;
1282 }
1283
1284 bpobj_close(&spa->spa_deferred_bpobj);
1285
1286 spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
1287
1288 /*

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

2208 return (SET_ERROR(EINVAL));
2209
2210 parse = (type == SPA_IMPORT_EXISTING ?
2211 VDEV_ALLOC_LOAD : VDEV_ALLOC_SPLIT);
2212
2213 /*
2214 * Create "The Godfather" zio to hold all async IOs
2215 */
1283 spa->spa_async_zio_root = NULL;
1284 }
1285
1286 bpobj_close(&spa->spa_deferred_bpobj);
1287
1288 spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
1289
1290 /*

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

2210 return (SET_ERROR(EINVAL));
2211
2212 parse = (type == SPA_IMPORT_EXISTING ?
2213 VDEV_ALLOC_LOAD : VDEV_ALLOC_SPLIT);
2214
2215 /*
2216 * Create "The Godfather" zio to hold all async IOs
2217 */
2216 spa->spa_async_zio_root = zio_root(spa, NULL, NULL,
2217 ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | ZIO_FLAG_GODFATHER);
2218 spa->spa_async_zio_root = kmem_alloc(max_ncpus * sizeof (void *),
2219 KM_SLEEP);
2220 for (int i = 0; i < max_ncpus; i++) {
2221 spa->spa_async_zio_root[i] = zio_root(spa, NULL, NULL,
2222 ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE |
2223 ZIO_FLAG_GODFATHER);
2224 }
2218
2219 /*
2220 * Parse the configuration into a vdev tree. We explicitly set the
2221 * value that will be returned by spa_version() since parsing the
2222 * configuration requires knowing the version number.
2223 */
2224 spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
2225 error = spa_config_parse(spa, &rvd, nvroot, NULL, 0, parse);

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

3562 spa->spa_first_txg = txg;
3563 spa->spa_uberblock.ub_txg = txg - 1;
3564 spa->spa_uberblock.ub_version = version;
3565 spa->spa_ubsync = spa->spa_uberblock;
3566
3567 /*
3568 * Create "The Godfather" zio to hold all async IOs
3569 */
2225
2226 /*
2227 * Parse the configuration into a vdev tree. We explicitly set the
2228 * value that will be returned by spa_version() since parsing the
2229 * configuration requires knowing the version number.
2230 */
2231 spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
2232 error = spa_config_parse(spa, &rvd, nvroot, NULL, 0, parse);

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

3569 spa->spa_first_txg = txg;
3570 spa->spa_uberblock.ub_txg = txg - 1;
3571 spa->spa_uberblock.ub_version = version;
3572 spa->spa_ubsync = spa->spa_uberblock;
3573
3574 /*
3575 * Create "The Godfather" zio to hold all async IOs
3576 */
3570 spa->spa_async_zio_root = zio_root(spa, NULL, NULL,
3571 ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | ZIO_FLAG_GODFATHER);
3577 spa->spa_async_zio_root = kmem_alloc(max_ncpus * sizeof (void *),
3578 KM_SLEEP);
3579 for (int i = 0; i < max_ncpus; i++) {
3580 spa->spa_async_zio_root[i] = zio_root(spa, NULL, NULL,
3581 ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE |
3582 ZIO_FLAG_GODFATHER);
3583 }
3572
3573 /*
3574 * Create the root vdev.
3575 */
3576 spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
3577
3578 error = spa_config_parse(spa, &rvd, nvroot, NULL, 0, VDEV_ALLOC_ADD);
3579

--- 3365 unchanged lines hidden ---
3584
3585 /*
3586 * Create the root vdev.
3587 */
3588 spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
3589
3590 error = spa_config_parse(spa, &rvd, nvroot, NULL, 0, VDEV_ALLOC_ADD);
3591

--- 3365 unchanged lines hidden ---