HomeFreeBSD

Fix several logic issues in domainset_empty_vm().

Description

Fix several logic issues in domainset_empty_vm().

  • Don't add 1 to the result of DOMAINSET_FLS.
  • Do not modify domainsets containing only empty domains.
  • Always flatten a _PREFER policy to _ROUNDROBIN if the preferred domain is empty. Previously we were doing this only when ds_cnt > 1.

These bugs could cause hangs during boot if a VM domain is empty.

Tested by: hselasky
Reviewed by: hselasky, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21420

Details

Provenance
markjAuthored on
Reviewer
hselasky
Differential Revision
D21420: Fix logic in domainset_empty_vm().
Parents
rS351546: Revert a part of r350883 that should never have gone in
Branches
Unknown
Tags
Unknown