HomeFreeBSD

Factor metaslab_load_wait() in metaslab_load()

Description

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

Details

Provenance
Serapheim Dimitropoulos <serapheimd@gmail.com>Authored on Jan 18 2019, 7:10 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jan 18 2019, 7:10 PM
Parents
rG960347d3a684: Fix 0 byte memory leak in zfs receive
Branches
Unknown
Tags
Unknown