Illumos #4121 vdev_label_init read only
4121 vdev_label_init should treat request as succeeded when pool is read only Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net> References: https://www.illumos.org/issues/4121 illumos/illumos-gate@973c78e94b Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1863
This commit is contained in:
parent
84b0aac5fd
commit
dda12da9f1
@ -644,7 +644,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);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user