mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Factor metaslab_load_wait() in metaslab_load()
Most callers that need to operate on a loaded metaslab, always call metaslab_load_wait() before loading the metaslab just in case someone else is already doing the work. Factoring metaslab_load_wait() within metaslab_load() makes the later more robust, as callers won't have to do the load-wait check explicitly every time they need to load a metaslab. Reviewed-by: Matt Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com> Closes #8290
This commit is contained in:
committed by
Brian Behlendorf
parent
960347d3a6
commit
b194fab0fb
+2
-5
@@ -910,11 +910,8 @@ dump_metaslab(metaslab_t *msp)
|
||||
|
||||
if (dump_opt['m'] > 2 && !dump_opt['L']) {
|
||||
mutex_enter(&msp->ms_lock);
|
||||
metaslab_load_wait(msp);
|
||||
if (!msp->ms_loaded) {
|
||||
VERIFY0(metaslab_load(msp));
|
||||
range_tree_stat_verify(msp->ms_allocatable);
|
||||
}
|
||||
VERIFY0(metaslab_load(msp));
|
||||
range_tree_stat_verify(msp->ms_allocatable);
|
||||
dump_metaslab_stats(msp);
|
||||
metaslab_unload(msp);
|
||||
mutex_exit(&msp->ms_lock);
|
||||
|
||||
Reference in New Issue
Block a user