loader: zfs_bootfs() needs to use config pool txg for boot device
The current implementation to pass zpool details to kernel is checking vdev state, however, it is not enough to check the state to get the "good" boot device. The kernel itself is implementing txg check to pick up the best device and will fail to boot when we attempt to boot from some other device. See also the check at: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/fs/zfs/spa.c#4977
For solution, record the pointer to best vdev (leaf device) into spa while building the pool config, and then we can greatly simplify the zfs_bootfs().
Updated by Electric Monk over 5 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit 45137058c754e4417a4b9610ef655bc26b175a31 Author: Toomas Soome <email@example.com> Date: 2018-04-23T16:15:40.000Z 9423 loader: zfs_bootfs() needs to use config pool txg for boot device Reviewed by: Igor Kozhukhov <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Approved by: Hans Rosenfeld <firstname.lastname@example.org>