git: 052051e2ea10 - stable/12 - loader: zfs reader does not need BOOT2 bits
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 08 Oct 2021 06:10:57 UTC
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) {