4121 vdev_label_init should treat request as succeeded when pool

is read only

llumos/illumos-gate@973c78e94b
This commit is contained in:
Xin LI 2014-01-01 01:05:38 +00:00
parent 3142b7d42d
commit f6eff23569

View File

@ -640,7 +640,7 @@ vdev_label_init(vdev_t *vd, uint64_t crtxg, vdev_labeltype_t reason)
/* Track the creation time for this vdev */
vd->vdev_crtxg = crtxg;
if (!vd->vdev_ops->vdev_op_leaf)
if (!vd->vdev_ops->vdev_op_leaf || !spa_writeable(spa))
return (0);
/*