MCPcopy Create free account
hub / github.com/F-Stack/f-stack / spa_vdev_exit

Function spa_vdev_exit

freebsd/contrib/openzfs/module/zfs/spa_misc.c:1296–1307  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

1294 * information.
1295 */
1296int
1297spa_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.

Callers 6

spa_vdev_addFunction · 0.85
spa_vdev_attachFunction · 0.85
spa_vdev_detachFunction · 0.85
spa_vdev_split_mirrorFunction · 0.85
vdev_remove_completeFunction · 0.85
spa_vdev_removeFunction · 0.85

Calls 4

vdev_autotrim_restartFunction · 0.85
vdev_rebuild_restartFunction · 0.85
spa_vdev_config_exitFunction · 0.85
mutex_exitFunction · 0.85

Tested by

no test coverage detected