1.) Not sure if this is beyond the scope of your fix, but is there a way, or a place, to indicate "temporary key installed by loader, please trash immediately after use"?
2.) Is it possible that some methods for extracting keys (i.e. other URLs) require other services that occur after filesystem/local?
3.) Will this prevent/encourage/interact-at-all with any possibly future work for encrypted rpool/BEs (for distros that boot off an rpool)?
1) it's beyond the scope. I don't know of such a way or how the loader integration will look (tsoome has some ideas).
2) The only currently supported URL scheme is file so, for now, this dependency is enough.
3) There will probably be some rework required in the future. This is really just to allow for easier experimentation with encrypted datasets until more options are available.
Why not move this section to after line 89, and only do the zfs mout -va once (one could also look at the keystatus property to help)?
I did it this way so that I could make the second mount non-fatal on error. Open to suggestions.
The main point of this change is really to enable easier experimentation with encrypted datasets in the short term until better key management strategies are available.