Skip to content

Commit dda12da

Browse files
grwilsonbehlendorf
authored andcommitted
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@973c78e Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1863
1 parent 84b0aac commit dda12da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/zfs/vdev_label.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ vdev_label_init(vdev_t *vd, uint64_t crtxg, vdev_labeltype_t reason)
644644
/* Track the creation time for this vdev */
645645
vd->vdev_crtxg = crtxg;
646646

647-
if (!vd->vdev_ops->vdev_op_leaf)
647+
if (!vd->vdev_ops->vdev_op_leaf || !spa_writeable(spa))
648648
return (0);
649649

650650
/*

0 commit comments

Comments
 (0)