]> granicus.if.org Git - zfs/commit
Don't activate metaslabs with weight 0
authorPaul Dagnelie <pcd@delphix.com>
Fri, 5 Jul 2019 23:45:20 +0000 (16:45 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 5 Jul 2019 23:45:20 +0000 (16:45 -0700)
commitfe0ea84812764c085b709aaa2cde5cc1fe3fc8fa
tree50d7439e48c87aba8dcabe9e2c3ac52ef121ad66
parent3b5fe2c351b1ba74ac75199310ad79a7597aa747
Don't activate metaslabs with weight 0

We return ENOSPC in metaslab_activate if the metaslab has weight 0,
to avoid activating a metaslab with no space available.  For sanity
checking, we also assert that there is no free space in the range
tree in that case.

Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #8968
module/zfs/metaslab.c