diff options
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r-- | module/zfs/vdev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 52198261e..834cc1a48 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -1906,6 +1906,12 @@ vdev_dtl_load(vdev_t *vd) if (vd->vdev_ops->vdev_op_leaf && vd->vdev_dtl_object != 0) { ASSERT(!vd->vdev_ishole); + /* + * If the dtl cannot be sync'd there is no need to open it. + */ + if (!spa_writeable(spa)) + return (0); + error = space_map_open(&vd->vdev_dtl_sm, mos, vd->vdev_dtl_object, 0, -1ULL, 0, &vd->vdev_dtl_lock); if (error) |