]> git.proxmox.com Git - mirror_zfs.git/commit
Factor metaslab_load_wait() in metaslab_load()
authorSerapheim Dimitropoulos <serapheimd@gmail.com>
Fri, 18 Jan 2019 19:10:32 +0000 (11:10 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 18 Jan 2019 19:10:32 +0000 (11:10 -0800)
commitb194fab0fb6caad18711abccaff3c69ad8b3f6d3
tree7f8d8d3507dc910b505d442921b826f30b1e3e66
parent960347d3a684a0063614eb293950f8f8c7dce7e1
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
cmd/zdb/zdb.c
include/sys/metaslab.h
include/sys/metaslab_impl.h
module/zfs/metaslab.c
module/zfs/vdev_initialize.c