mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
libsa/zfs: fail earlier in vdev_probe() if can't find ZPOOL_CONFIG_GUID
Don't store any configuration in memory from such weird label.
This commit is contained in:
parent
8949cdd9af
commit
8e8fd66ca0
1 changed files with 3 additions and 6 deletions
|
|
@ -2067,7 +2067,9 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv,
|
|||
nvlist_find(nvl, ZPOOL_CONFIG_POOL_GUID, DATA_TYPE_UINT64,
|
||||
NULL, &pool_guid, NULL) != 0 ||
|
||||
nvlist_find(nvl, ZPOOL_CONFIG_POOL_NAME, DATA_TYPE_STRING,
|
||||
NULL, &pool_name, &namelen) != 0) {
|
||||
NULL, &pool_name, &namelen) != 0 ||
|
||||
nvlist_find(nvl, ZPOOL_CONFIG_GUID, DATA_TYPE_UINT64,
|
||||
NULL, &guid, NULL) != 0) {
|
||||
/*
|
||||
* Cache and spare devices end up here - just ignore
|
||||
* them.
|
||||
|
|
@ -2106,11 +2108,6 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv,
|
|||
* be some kind of alias (overlapping slices, dangerously dedicated
|
||||
* disks etc).
|
||||
*/
|
||||
if (nvlist_find(nvl, ZPOOL_CONFIG_GUID, DATA_TYPE_UINT64,
|
||||
NULL, &guid, NULL) != 0) {
|
||||
nvlist_destroy(nvl);
|
||||
return (EIO);
|
||||
}
|
||||
vdev = vdev_find(guid);
|
||||
/* Has this vdev already been inited? */
|
||||
if (vdev && vdev->v_phys_read) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue