| 3500 | } |
| 3501 | |
| 3502 | static void |
| 3503 | vdev_remove_empty_log(vdev_t *vd, uint64_t txg) |
| 3504 | { |
| 3505 | spa_t *spa = vd->vdev_spa; |
| 3506 | |
| 3507 | ASSERT(vd->vdev_islog); |
| 3508 | ASSERT(vd == vd->vdev_top); |
| 3509 | ASSERT3U(txg, ==, spa_syncing_txg(spa)); |
| 3510 | |
| 3511 | dmu_tx_t *tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg); |
| 3512 | |
| 3513 | vdev_destroy_spacemaps(vd, tx); |
| 3514 | if (vd->vdev_top_zap != 0) { |
| 3515 | vdev_destroy_unlink_zap(vd, vd->vdev_top_zap, tx); |
| 3516 | vd->vdev_top_zap = 0; |
| 3517 | } |
| 3518 | |
| 3519 | dmu_tx_commit(tx); |
| 3520 | } |
| 3521 | |
| 3522 | void |
| 3523 | vdev_sync_done(vdev_t *vd, uint64_t txg) |
no test coverage detected