loader: zfs reader does not need BOOT2 bits

After switching zfsloader to use full libsa, we do not need
spa_get_primary() and spa_get_primary_vdev() any more.

Sponsored by:	Netflix, Klara Inc.
This commit is contained in:
Toomas Soome 2020-07-02 07:15:48 +00:00
parent 045f497cbc
commit 771f100ceb

View File

@ -1336,34 +1336,6 @@ spa_find_by_name(const char *name)
return (NULL);
}
#ifdef BOOT2
static spa_t *
spa_get_primary(void)
{
return (STAILQ_FIRST(&zfs_pools));
}
static vdev_t *
spa_get_primary_vdev(const spa_t *spa)
{
vdev_t *vdev;
vdev_t *kid;
if (spa == NULL)
spa = spa_get_primary();
if (spa == NULL)
return (NULL);
vdev = spa->spa_root_vdev;
if (vdev == NULL)
return (NULL);
for (kid = STAILQ_FIRST(&vdev->v_children); kid != NULL;
kid = STAILQ_FIRST(&vdev->v_children))
vdev = kid;
return (vdev);
}
#endif
static spa_t *
spa_create(uint64_t guid, const char *name)
{