summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Wilson <george.wilson@delphix.com>2013-12-11 11:45:30 -0800
committerChristopher Siden <chris.siden@delphix.com>2013-12-11 11:45:46 -0800
commit973c78e94bf9634782164382c9e291bf81161fa5 (patch)
treea6c2d0e816ecbe484d85dde3b23170976ab4bc7c
parent9584cebb1c69707f4c67306b661c2ed47d8676f1 (diff)
downloadillumos-joyent-973c78e94bf9634782164382c9e291bf81161fa5.tar.gz
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>
-rw-r--r--usr/src/uts/common/fs/zfs/vdev_label.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev_label.c b/usr/src/uts/common/fs/zfs/vdev_label.c
index 0b4915fca8..c7ae60c68f 100644
--- a/usr/src/uts/common/fs/zfs/vdev_label.c
+++ b/usr/src/uts/common/fs/zfs/vdev_label.c
@@ -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);
/*