metaslab_verify_weight_and_frag() shouldn't cause side-effects
metaslab_verify_weight_and_frag() a verification function and
by the end of it there shouldn't be any side-effects.
The function calls metaslab_weight() which in turn calls
metaslab_set_fragmentation(). The latter can dirty and otherwise
not dirty metaslab fro the next TXGand set metaslab_condense_wanted
if the spacemaps were just upgraded (meaning we just enabled the
SPACEMAP_HISTOGRAM feature through upgrade).
This patch adds a new flag as a parameter to metaslab_weight() and
metaslab_set_fragmentation() making the dirtying of the metaslab
optional.
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #9185
Closes #9282