]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: zfs_probe_dev should pick first matching zfs pool
authortsoome <tsoome@FreeBSD.org>
Wed, 23 Sep 2020 08:22:14 +0000 (08:22 +0000)
committertsoome <tsoome@FreeBSD.org>
Wed, 23 Sep 2020 08:22:14 +0000 (08:22 +0000)
commit34342655e6d6fc0b104b23906f39e982d9645963
treef62c57aa8871cf85c39db16ba4282abee9ff8ed4
parent667eef4ac6396ffe2d705b401a2a09f60ab38fe7
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.

Reported by: Alexander Leidinger
stand/efi/libefi/efizfs.c
stand/libsa/zfs/zfs.c