From 8949cdd9af536d3fc4313c057dcb383f474c3f84 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 10 Jul 2025 20:18:36 -0700 Subject: [PATCH] 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 058907b1d82..a31fa24f358 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;