Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 2021 06:10:57 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 052051e2ea10 - stable/12 - loader: zfs reader does not need BOOT2 bits
Message-ID:  <202110080610.1986Av08007402@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=052051e2ea10099ceab6033fedb7a58db5ce2439

commit 052051e2ea10099ceab6033fedb7a58db5ce2439
Author:     Toomas Soome <tsoome@FreeBSD.org>
AuthorDate: 2020-07-02 07:15:48 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2021-10-08 05:24:26 +0000

    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.
    
    (cherry picked from commit 771f100cebd8ada2bd764574386a71b5a5067f45)
---
 stand/libsa/zfs/zfsimpl.c | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c
index cc35f3d06f0e..8f299a0a3baf 100644
--- a/stand/libsa/zfs/zfsimpl.c
+++ b/stand/libsa/zfs/zfsimpl.c
@@ -1332,34 +1332,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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110080610.1986Av08007402>