* Lock the given spa_t for the purpose of adding or removing a vdev. * Grabs the global spa_namespace_lock plus the spa config lock for writing. * It returns the next transaction group for the spa_t. */
| 1157 | * It returns the next transaction group for the spa_t. |
| 1158 | */ |
| 1159 | uint64_t |
| 1160 | spa_vdev_enter(spa_t *spa) |
| 1161 | { |
| 1162 | mutex_enter(&spa->spa_vdev_top_lock); |
| 1163 | mutex_enter(&spa_namespace_lock); |
| 1164 | |
| 1165 | vdev_autotrim_stop_all(spa); |
| 1166 | |
| 1167 | return (spa_vdev_config_enter(spa)); |
| 1168 | } |
| 1169 | |
| 1170 | /* |
| 1171 | * The same as spa_vdev_enter() above but additionally takes the guid of |
no test coverage detected