mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Serialize access to spa->spa_feat_stats nvlist
The function spa_add_feature_stats() manipulates the shared nvlist spa->spa_feat_stats in an unsafe concurrent manner. Add a mutex to protect the list. Signed-off-by: Ned Bass <bass6@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3335
This commit is contained in:
committed by
Brian Behlendorf
parent
7008109646
commit
4eb30c6864
@@ -236,6 +236,7 @@ struct spa {
|
||||
uint64_t spa_feat_for_read_obj; /* required to read from pool */
|
||||
uint64_t spa_feat_desc_obj; /* Feature descriptions */
|
||||
uint64_t spa_feat_enabled_txg_obj; /* Feature enabled txg */
|
||||
kmutex_t spa_feat_stats_lock; /* protects spa_feat_stats */
|
||||
nvlist_t *spa_feat_stats; /* Cache of enabled features */
|
||||
/* cache feature refcounts */
|
||||
uint64_t spa_feat_refcount_cache[SPA_FEATURES];
|
||||
|
||||
Reference in New Issue
Block a user