From e39fe05b69e4d78311c5c25a8dc21b0b1dca2409 Mon Sep 17 00:00:00 2001 From: Fedor Uporov <60701163+fuporovvStack@users.noreply.github.com> Date: Tue, 9 Nov 2021 12:50:39 -0800 Subject: Skip spacemaps reading in case of pool readonly import The only zdb utility require to read metaslab-related data during read-only pool import because of spacemaps validation. Add global variable which will allow zdb read spacemaps in case of readonly import mode. Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Brian Behlendorf Signed-off-by: Fedor Uporov Closes #9095 Closes #12687 --- include/sys/spa_impl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sys/spa_impl.h') diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h index 21729e617..9714bbce9 100644 --- a/include/sys/spa_impl.h +++ b/include/sys/spa_impl.h @@ -370,6 +370,7 @@ struct spa { boolean_t spa_is_root; /* pool is root */ int spa_minref; /* num refs when first opened */ spa_mode_t spa_mode; /* SPA_MODE_{READ|WRITE} */ + boolean_t spa_read_spacemaps; /* spacemaps available if ro */ spa_log_state_t spa_log_state; /* log state */ uint64_t spa_autoexpand; /* lun expansion on/off */ ddt_t *spa_ddt[ZIO_CHECKSUM_FUNCTIONS]; /* in-core DDTs */ -- cgit v1.2.3