From ce8d41ef75e1667710a5aeb393877c7ed4b34576 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 28 Apr 2022 16:47:12 -0700 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') diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h index cb2c49e58..c8987e2e6 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