* Unlock the spa_t after adding or removing a vdev. Besides undoing the * locking of spa_vdev_enter(), we also want make sure the transactions have * synced to disk, and then update the global configuration cache with the new * information. */
| 1294 | * information. |
| 1295 | */ |
| 1296 | int |
| 1297 | spa_vdev_exit(spa_t *spa, vdev_t *vd, uint64_t txg, int error) |
| 1298 | { |
| 1299 | vdev_autotrim_restart(spa); |
| 1300 | vdev_rebuild_restart(spa); |
| 1301 | |
| 1302 | spa_vdev_config_exit(spa, vd, txg, error, FTAG); |
| 1303 | mutex_exit(&spa_namespace_lock); |
| 1304 | mutex_exit(&spa->spa_vdev_top_lock); |
| 1305 | |
| 1306 | return (error); |
| 1307 | } |
| 1308 | |
| 1309 | /* |
| 1310 | * Lock the given spa_t for the purpose of changing vdev state. |
no test coverage detected