From 36c6ffb6b6a4a77e7133b0f84a5aeccf0aa25499 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Sun, 26 Apr 2015 15:24:34 -0700 Subject: [PATCH] Illumos 5808 - spa_check_logs is not necessary on readonly pools 5808 spa_check_logs is not necessary on readonly pools Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: Simon Klinkert Reviewed by: Will Andrews Approved by: Gordon Ross References: https://www.illumos.org/issues/5808 https://github.com/illumos/illumos-gate/commit/23367a2f Ported-by: DHE Signed-off-by: Brian Behlendorf Closes #3369 --- module/zfs/spa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 53aa05d01..3312c301c 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -2714,7 +2714,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config, if (rvd->vdev_state <= VDEV_STATE_CANT_OPEN) return (SET_ERROR(ENXIO)); - if (spa_check_logs(spa)) { + if (spa_writeable(spa) && spa_check_logs(spa)) { *ereport = FM_EREPORT_ZFS_LOG_REPLAY; return (spa_vdev_err(rvd, VDEV_AUX_BAD_LOG, ENXIO)); }