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

Function vdev_expand

freebsd/contrib/openzfs/module/zfs/vdev.c:4980–4995  ·  view source on GitHub ↗

* Expand a vdev if possible. */

Source from the content-addressed store, hash-verified

4978 * Expand a vdev if possible.
4979 */
4980void
4981vdev_expand(vdev_t *vd, uint64_t txg)
4982{
4983 ASSERT(vd->vdev_top == vd);
4984 ASSERT(spa_config_held(vd->vdev_spa, SCL_ALL, RW_WRITER) == SCL_ALL);
4985 ASSERT(vdev_is_concrete(vd));
4986
4987 vdev_set_deflate_ratio(vd);
4988
4989 if ((vd->vdev_asize >> vd->vdev_ms_shift) > vd->vdev_ms_count &&
4990 vdev_is_concrete(vd)) {
4991 vdev_metaslab_group_create(vd);
4992 VERIFY(vdev_metaslab_init(vd, txg) == 0);
4993 vdev_config_dirty(vd);
4994 }
4995}
4996
4997/*
4998 * Split a vdev.

Callers 3

spa_config_updateFunction · 0.85
spa_createFunction · 0.85
spa_vdev_detachFunction · 0.85

Calls 6

spa_config_heldFunction · 0.85
vdev_is_concreteFunction · 0.85
vdev_set_deflate_ratioFunction · 0.85
vdev_metaslab_initFunction · 0.85
vdev_config_dirtyFunction · 0.85

Tested by

no test coverage detected