Page MenuHomeFreeBSD

loader.efi: only fetch zfs pool guid for the actual boot device
ClosedPublic

Authored by tsoome on Apr 11 2017, 12:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 16 2024, 5:30 AM
Unknown Object (File)
Jan 4 2024, 6:01 PM
Unknown Object (File)
Dec 21 2023, 11:22 PM
Unknown Object (File)
Dec 20 2023, 5:25 AM
Unknown Object (File)
Sep 20 2023, 7:25 PM
Unknown Object (File)
Sep 14 2023, 3:33 AM
Unknown Object (File)
Sep 8 2023, 12:56 AM
Unknown Object (File)
Sep 4 2023, 4:20 AM
Subscribers

Details

Summary

With the zfs proble cleanup, the mistake did slip in the probe code;
instead of reading the pool GUID for the actual boot device (partition),
we read GUID for first found pool from the boot disk.

This will break the case when there are both zfs pool and ufs on the boot
disk, and the ufs is used for boot, not zfs.

Diff Detail

Event Timeline

smh requested changes to this revision.Apr 11 2017, 12:34 PM
smh added a subscriber: smh.
smh added inline comments.
sys/boot/efi/loader/main.c
812

Comment needs updating

820

This logic is confusing why not just do:

if (pd->pd_handle == boot_dev)
      (void) zfs_probe_dev(devname, &pool_guid);
else
      (void) zfs_probe_dev(devname, NULL);

Also why not merge the two sets of loops?

This revision now requires changes to proceed.Apr 11 2017, 12:34 PM

This works for me on a ThunderX with UFS root & ZFS.

tsoome edited edge metadata.

We do not really need double loop and pointer game.

tsoome added inline comments.
sys/boot/efi/loader/main.c
820

yes, no need for them. nuked.

LGM, much cleaner than it was.

This revision is now accepted and ready to land.Apr 11 2017, 2:03 PM
This revision was automatically updated to reflect the committed changes.