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
This commit is contained in:
parent
f720186b23
commit
df91b26d5d
@ -1049,8 +1049,10 @@ vdev_probe(vdev_phys_read_t *read, void *read_priv, spa_t **spap)
|
||||
STAILQ_FOREACH(pool_vdev, &spa->spa_vdevs, v_childlink)
|
||||
if (top_vdev == pool_vdev)
|
||||
break;
|
||||
if (!pool_vdev && top_vdev)
|
||||
if (!pool_vdev && top_vdev) {
|
||||
top_vdev->spa = spa;
|
||||
STAILQ_INSERT_TAIL(&spa->spa_vdevs, top_vdev, v_childlink);
|
||||
}
|
||||
|
||||
/*
|
||||
* We should already have created an incomplete vdev for this
|
||||
|
Loading…
x
Reference in New Issue
Block a user