HomeFreeBSD

loader: zfs toplevel vdev must have spa set.

Description

loader: zfs toplevel vdev must have spa set.

The salt based checksum mechanisms, such as skein, are storing the seed
in spa structure, and need to access the spa to use the seed. The current
mechanism for quick access to correct spa is via pointer provided by
vdev structure, but unfortunately the current code does set spa only
for the leaf vdev. This patch will fix the issue by making sure the
loader zfs reader will set spa also for top-level vdevs.

PR: 214375
Reported by: lstewart
Reviewed by: allanjude, imp
Approved by: allanjude (mentor), imp (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8487

Details