HomeFreeBSD

loader: zfs_probe_dev should pick first matching zfs pool

Description

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

Details

Provenance
tsoomeAuthored on
Parents
rS366065: Fix build.
Branches
Unknown
Tags
Unknown