mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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 <serapheim@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com> Closes #9095 Closes #12687
This commit is contained in:
@@ -118,6 +118,7 @@ extern int zfs_recover;
|
||||
extern unsigned long zfs_arc_meta_min, zfs_arc_meta_limit;
|
||||
extern int zfs_vdev_async_read_max_active;
|
||||
extern boolean_t spa_load_verify_dryrun;
|
||||
extern boolean_t spa_mode_readable_spacemaps;
|
||||
extern int zfs_reconstruct_indirect_combinations_max;
|
||||
extern int zfs_btree_verify_intensity;
|
||||
|
||||
@@ -8524,6 +8525,11 @@ main(int argc, char **argv)
|
||||
*/
|
||||
spa_load_verify_dryrun = B_TRUE;
|
||||
|
||||
/*
|
||||
* ZDB should have ability to read spacemaps.
|
||||
*/
|
||||
spa_mode_readable_spacemaps = B_TRUE;
|
||||
|
||||
kernel_init(SPA_MODE_READ);
|
||||
|
||||
if (dump_all)
|
||||
|
||||
Reference in New Issue
Block a user