The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8949cdd9af536d3fc4313c057dcb383f474c3f84
commit 8949cdd9af536d3fc4313c057dcb383f474c3f84 Author: Gleb Smirnoff <gleb...@freebsd.org> AuthorDate: 2025-07-11 03:18:36 +0000 Commit: Gleb Smirnoff <gleb...@freebsd.org> CommitDate: 2025-07-11 03:18:36 +0000 libsa/zfs: don't read and store ZPOOL_CONFIG_VDEV_CHILDREN in vdev_probe() This is just the value from the current label and it is not used in the function. Later zfs_spa_init() will call vdev_init_from_nvlist() and it will obtain the value. --- stand/libsa/zfs/zfsimpl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 058907b1d822..a31fa24f358e 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -2006,7 +2006,7 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv, vdev_t *vdev; nvlist_t *nvl; uint64_t val; - uint64_t guid, vdev_children; + uint64_t guid; uint64_t pool_txg, pool_guid; const char *pool_name; int rc, namelen; @@ -2083,8 +2083,6 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv, if (spa == NULL) { char *name; - nvlist_find(nvl, ZPOOL_CONFIG_VDEV_CHILDREN, - DATA_TYPE_UINT64, NULL, &vdev_children, NULL); name = malloc(namelen + 1); if (name == NULL) { nvlist_destroy(nvl); @@ -2098,7 +2096,6 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv, nvlist_destroy(nvl); return (ENOMEM); } - spa->spa_root_vdev->v_nchildren = vdev_children; } if (pool_txg > spa->spa_txg) spa->spa_txg = pool_txg;