loader: rewrite zfs vdev initialization
In some cases the pool discovery will get stuck in infinite loop while setting up the vdev children.
To fix, we split the vdev setup into two parts, first we create vdevs based on configuration we do get from pool label, then, we process pool config from MOS and update the pool config if needed.
Testing done: confirm previously hung loader is not hung any more.
FreeBSD issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241118
Updated by Adam Stylinski over 1 year ago
Tested on an Ivy Bridge system with a single SSD vdev and the BIOS bootloader. The controller has a storage pool as well as a root pool, spanning over the chipset's AHCI controller and an LSI2008 based controller.
Prior to this fix, the first stage of the bootloader (gptzfsboot) would hang in an infinite loop while enumerating the tail queue of vdevs. After this fix, it boots.
Updated by Electric Monk over 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit da9bf00574dd2845efcb9b791f4b44ecf1d1548c Author: Toomas Soome <email@example.com> Date: 2020-01-06T18:09:40.000Z 12078 loader: rewrite zfs vdev initialization Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>