]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: zfs_probe_dev should pick first matching zfs pool
authorToomas Soome <tsoome@FreeBSD.org>
Wed, 23 Sep 2020 08:22:14 +0000 (08:22 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 8 Oct 2021 05:24:27 +0000 (00:24 -0500)
commit97318fde948f1e543e7df2c1034b84cd96dafcf1
treeba87b582a3d6a47a9e817fab568b8ffd8562755d
parent19a32560ab25624d9a31c674d07edb2e6b8f8992
loader: zfs_probe_dev should pick first matching zfs pool

During devswitch probe, we pick boot pool based on boot disk, if the boot
disk happens to have multiple pools in freebsd-zfs partitions, the current
code does pick last pool from boot disk as boot pool. While there is no
way at that stage to test, the more logical approach would be to pick
first matching pool.

This patch is assuming we do pass pool guid pointer with guid value 0,
this will help us to determine, if the guid value is already set or not.

The general suggestion would be not to share disk between different pools.

(cherry picked from commit 867ae3c38d1aa97300bd35f457037b3f1a0a103f)
stand/efi/libefi/efizfs.c
stand/libsa/zfs/zfs.c