Lines Matching defs:spa

138 #include <sys/spa.h>
214 vdev_config_generate(spa_t *spa, vdev_t *vd, boolean_t getstats,
249 spa_version(spa) >= SPA_VERSION_RAIDZ2) ||
251 spa_version(spa) >= SPA_VERSION_RAIDZ3));
317 if (spa_scan_get_stats(spa, &ps) == 0) {
345 child[idx++] = vdev_config_generate(spa, cvd,
407 vdev_top_config_generate(spa_t *spa, nvlist_t *config)
409 vdev_t *rvd = spa->spa_root_vdev;
444 spa_t *spa = vd->vdev_spa;
453 ASSERT(spa_config_held(spa, SCL_STATE_ALL, RW_WRITER) == SCL_STATE_ALL);
464 zio = zio_root(spa, NULL, NULL, flags);
518 spa_t *spa = vd->vdev_spa;
584 spa_has_spare(spa, device_guid)) {
594 return (!spa_has_spare(spa, device_guid) ||
598 return (spa_has_spare(spa, device_guid));
614 (spa = spa_by_guid(pool_guid, device_guid)) != NULL &&
615 spa_mode(spa) == FREAD)
636 spa_t *spa = vd->vdev_spa;
648 ASSERT(spa_config_held(spa, SCL_ALL, RW_WRITER) == SCL_ALL);
658 if (!vd->vdev_ops->vdev_op_leaf || !spa_writeable(spa))
743 spa_version(spa)) == 0);
756 spa_version(spa)) == 0);
765 txg = spa->spa_uberblock.ub_txg;
766 label = spa_config_generate(spa, vd, txg, B_FALSE);
793 *ub = spa->spa_uberblock;
804 zio = zio_root(spa, NULL, NULL, flags);
898 spa_t *spa = zio->io_spa;
907 if (ub->ub_txg <= spa->spa_load_max_txg &&
954 spa_t *spa = rvd->vdev_spa;
968 spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER);
969 zio = zio_root(spa, NULL, &cb, flags);
981 spa_config_exit(spa, SCL_ALL, FTAG);
1034 spa_t *spa = svd[0]->vdev_spa;
1038 zio = zio_root(spa, NULL, &good_writes, flags);
1050 zio = zio_root(spa, NULL, NULL, flags);
1141 vdev_label_sync_list(spa_t *spa, int l, uint64_t txg, int flags)
1143 list_t *dl = &spa->spa_config_dirty_list;
1151 zio = zio_root(spa, NULL, NULL, flags);
1159 zio_t *vio = zio_null(zio, spa, NULL,
1172 zio = zio_root(spa, NULL, NULL, flags);
1196 spa_t *spa = svd[0]->vdev_spa;
1197 uberblock_t *ub = &spa->spa_uberblock;
1226 uberblock_update(ub, spa->spa_root_vdev, txg) == B_FALSE &&
1227 list_is_empty(&spa->spa_config_dirty_list))
1230 if (txg > spa_freeze_txg(spa))
1233 ASSERT(txg <= spa->spa_final_txg);
1241 zio = zio_root(spa, NULL, NULL, flags);
1243 for (vd = txg_list_head(&spa->spa_vdev_txg_list, TXG_CLEAN(txg)); vd;
1244 vd = txg_list_next(&spa->spa_vdev_txg_list, vd, TXG_CLEAN(txg)))
1258 if ((error = vdev_label_sync_list(spa, 0, txg, flags)) != 0)
1289 if ((error = vdev_label_sync_list(spa, 1, txg, flags)) != 0)