diff options
Diffstat (limited to 'include/sys/metaslab_impl.h')
-rw-r--r-- | include/sys/metaslab_impl.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/include/sys/metaslab_impl.h b/include/sys/metaslab_impl.h index 676c5dd46..ca1104c14 100644 --- a/include/sys/metaslab_impl.h +++ b/include/sys/metaslab_impl.h @@ -69,7 +69,7 @@ typedef enum trace_alloc_type { TRACE_ENOSPC = -6ULL, TRACE_CONDENSING = -7ULL, TRACE_VDEV_ERROR = -8ULL, - TRACE_INITIALIZING = -9ULL + TRACE_DISABLED = -9ULL, } trace_alloc_type_t; #define METASLAB_WEIGHT_PRIMARY (1ULL << 63) @@ -272,10 +272,10 @@ struct metaslab_group { uint64_t mg_fragmentation; uint64_t mg_histogram[RANGE_TREE_HISTOGRAM_SIZE]; - int mg_ms_initializing; - boolean_t mg_initialize_updating; - kmutex_t mg_ms_initialize_lock; - kcondvar_t mg_ms_initialize_cv; + int mg_ms_disabled; + boolean_t mg_disabled_updating; + kmutex_t mg_ms_disabled_lock; + kcondvar_t mg_ms_disabled_cv; }; /* @@ -389,11 +389,24 @@ struct metaslab { range_tree_t *ms_defer[TXG_DEFER_SIZE]; range_tree_t *ms_checkpointing; /* to add to the checkpoint */ + /* + * The ms_trim tree is the set of allocatable segments which are + * eligible for trimming. (When the metaslab is loaded, it's a + * subset of ms_allocatable.) It's kept in-core as long as the + * autotrim property is set and is not vacated when the metaslab + * is unloaded. Its purpose is to aggregate freed ranges to + * facilitate efficient trimming. + */ + range_tree_t *ms_trim; + boolean_t ms_condensing; /* condensing? */ boolean_t ms_condense_wanted; uint64_t ms_condense_checked_txg; - uint64_t ms_initializing; /* leaves initializing this ms */ + /* + * The number of consumers which have disabled the metaslab. + */ + uint64_t ms_disabled; /* * We must always hold the ms_lock when modifying ms_loaded |