block/008: don't try to offline all CPUs if all CPUs are hotpluggable
Chen Rong reported that if CPU0 is hotpluggable (because we booted with
cpu0_hotplug or CONFIG_BOOTPARAM_HOTPLUG_CPU0 was enabled), block/008
can try to offline all CPUs at once, which isn't allowed. Fix it by
repeatedly offlining as many CPUs as is allowed and onlining all CPUs,
instead of the previous approach of randomly onlining/offlining. This is
better than the previous approach because we won't try to online already
online CPUs and offline already offline CPUs. Closes #23.
Reported-by: Chen Rong <chenr.fnst@cn.fujitsu.com> Signed-off-by: Omar Sandoval <osandov@fb.com>