@@ -3109,6 +3109,7 @@ spa_load(spa_t *spa, spa_load_state_t state, spa_import_type_t type)
3109
3109
spa -> spa_load_state = state ;
3110
3110
(void ) spa_import_progress_set_state (spa_guid (spa ),
3111
3111
spa_load_state (spa ));
3112
+ spa_import_progress_set_notes (spa , "spa_load()" );
3112
3113
3113
3114
gethrestime (& spa -> spa_loaded_ts );
3114
3115
error = spa_load_impl (spa , type , & ereport );
@@ -3785,6 +3786,7 @@ spa_ld_select_uberblock(spa_t *spa, spa_import_type_t type)
3785
3786
return (spa_vdev_err (rvd , VDEV_AUX_ACTIVE , EREMOTEIO ));
3786
3787
}
3787
3788
3789
+ spa_import_progress_set_notes (spa , "checking MMP activity" );
3788
3790
int error = spa_activity_check (spa , ub , spa -> spa_config );
3789
3791
if (error ) {
3790
3792
nvlist_free (label );
@@ -4995,6 +4997,7 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
4995
4997
/*
4996
4998
* Retrieve the checkpoint txg if the pool has a checkpoint.
4997
4999
*/
5000
+ spa_import_progress_set_notes (spa , "Loading checkpoint txg" );
4998
5001
error = spa_ld_read_checkpoint_txg (spa );
4999
5002
if (error != 0 )
5000
5003
return (error );
@@ -5007,6 +5010,7 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5007
5010
* initiated. Otherwise we could be reading from indirect vdevs before
5008
5011
* we have loaded their mappings.
5009
5012
*/
5013
+ spa_import_progress_set_notes (spa , "Loading indirect vdev metadata" );
5010
5014
error = spa_ld_open_indirect_vdev_metadata (spa );
5011
5015
if (error != 0 )
5012
5016
return (error );
@@ -5015,6 +5019,7 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5015
5019
* Retrieve the full list of active features from the MOS and check if
5016
5020
* they are all supported.
5017
5021
*/
5022
+ spa_import_progress_set_notes (spa , "Checking feature flags" );
5018
5023
error = spa_ld_check_features (spa , & missing_feat_write );
5019
5024
if (error != 0 )
5020
5025
return (error );
@@ -5023,13 +5028,15 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5023
5028
* Load several special directories from the MOS needed by the dsl_pool
5024
5029
* layer.
5025
5030
*/
5031
+ spa_import_progress_set_notes (spa , "Loading special MOS directories" );
5026
5032
error = spa_ld_load_special_directories (spa );
5027
5033
if (error != 0 )
5028
5034
return (error );
5029
5035
5030
5036
/*
5031
5037
* Retrieve pool properties from the MOS.
5032
5038
*/
5039
+ spa_import_progress_set_notes (spa , "Loading properties" );
5033
5040
error = spa_ld_get_props (spa );
5034
5041
if (error != 0 )
5035
5042
return (error );
@@ -5038,6 +5045,7 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5038
5045
* Retrieve the list of auxiliary devices - cache devices and spares -
5039
5046
* and open them.
5040
5047
*/
5048
+ spa_import_progress_set_notes (spa , "Loading AUX vdevs" );
5041
5049
error = spa_ld_open_aux_vdevs (spa , type );
5042
5050
if (error != 0 )
5043
5051
return (error );
@@ -5046,14 +5054,17 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5046
5054
* Load the metadata for all vdevs. Also check if unopenable devices
5047
5055
* should be autoreplaced.
5048
5056
*/
5057
+ spa_import_progress_set_notes (spa , "Loading vdev metadata" );
5049
5058
error = spa_ld_load_vdev_metadata (spa );
5050
5059
if (error != 0 )
5051
5060
return (error );
5052
5061
5062
+ spa_import_progress_set_notes (spa , "Loading dedup tables" );
5053
5063
error = spa_ld_load_dedup_tables (spa );
5054
5064
if (error != 0 )
5055
5065
return (error );
5056
5066
5067
+ spa_import_progress_set_notes (spa , "Loading BRT" );
5057
5068
error = spa_ld_load_brt (spa );
5058
5069
if (error != 0 )
5059
5070
return (error );
@@ -5062,6 +5073,7 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5062
5073
* Verify the logs now to make sure we don't have any unexpected errors
5063
5074
* when we claim log blocks later.
5064
5075
*/
5076
+ spa_import_progress_set_notes (spa , "Verifying Log Devices" );
5065
5077
error = spa_ld_verify_logs (spa , type , ereport );
5066
5078
if (error != 0 )
5067
5079
return (error );
@@ -5083,6 +5095,7 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5083
5095
* state. When performing an extreme rewind, we verify the whole pool,
5084
5096
* which can take a very long time.
5085
5097
*/
5098
+ spa_import_progress_set_notes (spa , "Verifying pool data" );
5086
5099
error = spa_ld_verify_pool_data (spa );
5087
5100
if (error != 0 )
5088
5101
return (error );
@@ -5092,13 +5105,15 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5092
5105
* we write anything to the pool because we'd need to update the space
5093
5106
* accounting using the deflated sizes.
5094
5107
*/
5108
+ spa_import_progress_set_notes (spa , "Calculating deflated space" );
5095
5109
spa_update_dspace (spa );
5096
5110
5097
5111
/*
5098
5112
* We have now retrieved all the information we needed to open the
5099
5113
* pool. If we are importing the pool in read-write mode, a few
5100
5114
* additional steps must be performed to finish the import.
5101
5115
*/
5116
+ spa_import_progress_set_notes (spa , "Starting import" );
5102
5117
if (spa_writeable (spa ) && (spa -> spa_load_state == SPA_LOAD_RECOVER ||
5103
5118
spa -> spa_load_max_txg == UINT64_MAX )) {
5104
5119
uint64_t config_cache_txg = spa -> spa_config_txg ;
@@ -5122,6 +5137,7 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5122
5137
(u_longlong_t )spa -> spa_uberblock .ub_checkpoint_txg );
5123
5138
}
5124
5139
5140
+ spa_import_progress_set_notes (spa , "Claiming ZIL blocks" );
5125
5141
/*
5126
5142
* Traverse the ZIL and claim all blocks.
5127
5143
*/
@@ -5141,13 +5157,15 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5141
5157
* will have been set for us by ZIL traversal operations
5142
5158
* performed above.
5143
5159
*/
5160
+ spa_import_progress_set_notes (spa , "Syncing ZIL claims" );
5144
5161
txg_wait_synced (spa -> spa_dsl_pool , spa -> spa_claim_max_txg );
5145
5162
5146
5163
/*
5147
5164
* Check if we need to request an update of the config. On the
5148
5165
* next sync, we would update the config stored in vdev labels
5149
5166
* and the cachefile (by default /etc/zfs/zpool.cache).
5150
5167
*/
5168
+ spa_import_progress_set_notes (spa , "Updating configs" );
5151
5169
spa_ld_check_for_config_update (spa , config_cache_txg ,
5152
5170
update_config_cache );
5153
5171
@@ -5156,6 +5174,7 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5156
5174
* Then check all DTLs to see if anything needs resilvering.
5157
5175
* The resilver will be deferred if a rebuild was started.
5158
5176
*/
5177
+ spa_import_progress_set_notes (spa , "Starting resilvers" );
5159
5178
if (vdev_rebuild_active (spa -> spa_root_vdev )) {
5160
5179
vdev_rebuild_restart (spa );
5161
5180
} else if (!dsl_scan_resilvering (spa -> spa_dsl_pool ) &&
@@ -5169,6 +5188,8 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5169
5188
*/
5170
5189
spa_history_log_version (spa , "open" , NULL );
5171
5190
5191
+ spa_import_progress_set_notes (spa ,
5192
+ "Restarting device removals" );
5172
5193
spa_restart_removal (spa );
5173
5194
spa_spawn_aux_threads (spa );
5174
5195
@@ -5181,19 +5202,26 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, const char **ereport)
5181
5202
* auxiliary threads above (from which the livelist
5182
5203
* deletion zthr is part of).
5183
5204
*/
5205
+ spa_import_progress_set_notes (spa ,
5206
+ "Cleaning up inconsistent objsets" );
5184
5207
(void ) dmu_objset_find (spa_name (spa ),
5185
5208
dsl_destroy_inconsistent , NULL , DS_FIND_CHILDREN );
5186
5209
5187
5210
/*
5188
5211
* Clean up any stale temporary dataset userrefs.
5189
5212
*/
5213
+ spa_import_progress_set_notes (spa ,
5214
+ "Cleaning up temporary userrefs" );
5190
5215
dsl_pool_clean_tmp_userrefs (spa -> spa_dsl_pool );
5191
5216
5192
5217
spa_config_enter (spa , SCL_CONFIG , FTAG , RW_READER );
5218
+ spa_import_progress_set_notes (spa , "Restarting Initialize" );
5193
5219
vdev_initialize_restart (spa -> spa_root_vdev );
5220
+ spa_import_progress_set_notes (spa , "Restarting TRIM" );
5194
5221
vdev_trim_restart (spa -> spa_root_vdev );
5195
5222
vdev_autotrim_restart (spa );
5196
5223
spa_config_exit (spa , SCL_CONFIG , FTAG );
5224
+ spa_import_progress_set_notes (spa , "Finished importing" );
5197
5225
}
5198
5226
5199
5227
spa_import_progress_remove (spa_guid (spa ));
0 commit comments