]> git.proxmox.com Git - mirror_zfs.git/commit
special device removal space accounting fixes
authorMatthew Ahrens <matthew.ahrens@delphix.com>
Thu, 17 Dec 2020 20:11:56 +0000 (12:11 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Dec 2020 22:34:59 +0000 (14:34 -0800)
commita103ae446ed4aaaac6c83ce242efef313aad2200
tree097bfa129ceeabffb78221cae02f3bb06baa2aa4
parent2ab24dfded7f2932a41db36e76805a56b13341ba
special device removal space accounting fixes

The space in special devices is not included in spa_dspace (or
dsl_pool_adjustedsize(), or the zfs `available` property).  Therefore
there is always at least as much free space in the normal class, as
there is allocated in the special class(es).  And therefore, there is
always enough free space to remove a special device.

However, the checks for free space when removing special devices did not
take this into account.  This commit corrects that.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #11329
module/zfs/spa_misc.c
module/zfs/vdev_removal.c
tests/test-runner/bin/zts-report.py.in
tests/zfs-tests/tests/functional/alloc_class/alloc_class_012_pos.ksh