]> www.infradead.org Git - users/sagi/blktests.git/commit
block/008: don't try to offline all CPUs if all CPUs are hotpluggable
authorOmar Sandoval <osandov@fb.com>
Mon, 11 Jun 2018 18:31:57 +0000 (11:31 -0700)
committerOmar Sandoval <osandov@fb.com>
Mon, 11 Jun 2018 18:31:57 +0000 (11:31 -0700)
commit8de43b4b284cc8eaba0bb0a04604089737b3e8b5
tree3f84a17e02db0c0badb2d8e534f483f24e2fa216
parente299bcf1a09a87cceb522fc2a8631d128a165038
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>
common/cpuhotplug
tests/block/008