From 973c78e94bf9634782164382c9e291bf81161fa5 Mon Sep 17 00:00:00 2001 From: George Wilson Date: Wed, 11 Dec 2013 11:45:30 -0800 Subject: 4121 vdev_label_init should treat request as succeeded when pool is read only Reviewed by: Christopher Siden Reviewed by: Matthew Ahrens Reviewed by: Saso Kiselkov Approved by: Richard Lowe --- usr/src/uts/common/fs/zfs/vdev_label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); /* -- cgit v1.2.3