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

Function spa_vdev_enter

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

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

Source from the content-addressed store, hash-verified

1157 * It returns the next transaction group for the spa_t.
1158 */
1159uint64_t
1160spa_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

Callers 5

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

Calls 3

mutex_enterFunction · 0.85
vdev_autotrim_stop_allFunction · 0.85
spa_vdev_config_enterFunction · 0.85

Tested by

no test coverage detected