summaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_label.c
diff options
context:
space:
mode:
authorGeorge Wilson <[email protected]>2013-12-12 10:19:54 -0800
committerBrian Behlendorf <[email protected]>2013-12-12 10:24:01 -0800
commitdda12da9f1ec714af0e468aa03c24f402961f135 (patch)
tree269aa1880682c21d059904152b82ae02f711d3fb /module/zfs/vdev_label.c
parent84b0aac5fdab6daf8c4179dfba4abeb47e0d8b8e (diff)
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 <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Saso Kiselkov <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/4121 illumos/illumos-gate@973c78e94bf9634782164382c9e291bf81161fa5 Ported-by: Brian Behlendorf <[email protected]> Closes #1863
Diffstat (limited to 'module/zfs/vdev_label.c')
-rw-r--r--module/zfs/vdev_label.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/vdev_label.c b/module/zfs/vdev_label.c
index 146dc28e8..568ae06b3 100644
--- a/module/zfs/vdev_label.c
+++ b/module/zfs/vdev_label.c
@@ -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);
/*