mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Use cached feature info in spa_add_feature_stats()
Avoid issuing I/O to the pool when retrieving feature flags information. Trying to read the ZAPs from disk means that zpool clear would hang if the pool is suspended and recovery would require a reboot. To keep the feature stats resident in memory, we hang a cached nvlist off of the spa. It is built up from disk the first time spa_add_feature_stats() is called, and refreshed thereafter using the cached feature reference counts. spa_add_feature_stats() gets called at pool import time so we can be sure the cached nvlist will be available if the pool is later suspended. Signed-off-by: Ned Bass <bass6@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3082
This commit is contained in:
committed by
Brian Behlendorf
parent
0e86d309cc
commit
417104bdd3
@@ -643,6 +643,7 @@ spa_remove(spa_t *spa)
|
||||
|
||||
nvlist_free(spa->spa_label_features);
|
||||
nvlist_free(spa->spa_load_info);
|
||||
nvlist_free(spa->spa_feat_stats);
|
||||
spa_config_set(spa, NULL);
|
||||
|
||||
refcount_destroy(&spa->spa_refcount);
|
||||
|
||||
Reference in New Issue
Block a user