Author: tsoome Date: Thu Nov 17 19:38:30 2016 New Revision: 308776 URL: https://svnweb.freebsd.org/changeset/base/308776
Log: 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 Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Thu Nov 17 19:02:25 2016 (r308775) +++ head/sys/boot/zfs/zfsimpl.c Thu Nov 17 19:38:30 2016 (r308776) @@ -1049,8 +1049,10 @@ vdev_probe(vdev_phys_read_t *read, void 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 _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"