fix zfs pool creation accidentally broken by r305331

The upstream change introduced a new load state, SPA_LOAD_CREATE,
and vdev_geom code needs to be aware of it.

Tested by:	cy
MFC after:	1 week
X-MFC with:	r305331
This commit is contained in:
Andriy Gapon 2016-09-06 06:09:12 +00:00
parent 50002d3dfa
commit 1a82707cd7

View File

@ -777,7 +777,8 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
if (vd->vdev_spa->spa_splitting_newspa || if (vd->vdev_spa->spa_splitting_newspa ||
(vd->vdev_prevstate == VDEV_STATE_UNKNOWN && (vd->vdev_prevstate == VDEV_STATE_UNKNOWN &&
vd->vdev_spa->spa_load_state == SPA_LOAD_NONE)) { vd->vdev_spa->spa_load_state == SPA_LOAD_NONE ||
vd->vdev_spa->spa_load_state == SPA_LOAD_CREATE)) {
/* /*
* We are dealing with a vdev that hasn't been previously * We are dealing with a vdev that hasn't been previously
* opened (since boot), and we are not loading an * opened (since boot), and we are not loading an