We have a usecase where we have to chainload loader.efi off the
dataset. The recent loader.efi breakage was such that it happened before
it could clear bootonce. We really should be clearing it in boot1.efi in
this case so that we can fall back to the last known good image.
We have to re-implement the bootonce protocol here because boot1 doesn't
have devdesc. But inlining zfs_get_bootonce and all it calls was only
about 20 lines of actual lines of code since we didn't have to go back
and forth to the devdesc, lookup the spa many times, etc. Add comments
to this effect with details.
Sponsored by: Netflix