diff options
author | Fedor Uporov <[email protected]> | 2021-11-09 12:50:39 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-09 12:50:39 -0800 |
commit | e39fe05b69e4d78311c5c25a8dc21b0b1dca2409 (patch) | |
tree | 4390492925ff2e64cefbcd073fe12f4333b95980 /include/sys | |
parent | 345196be182ad6efe07ea21372117243ba6d7910 (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Fedor Uporov <[email protected]>
Closes #9095
Closes #12687
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/spa_impl.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 */ |