]> www.infradead.org Git - users/sagi/blktests.git/commit
block/011: recover test target NVME device capacity
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 26 May 2023 04:58:43 +0000 (13:58 +0900)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 9 Jun 2023 04:53:11 +0000 (13:53 +0900)
commitf8f33218eca7a9e0c925f01be153fddcf08ee0fe
tree7cbe493ef53baeb1a5e599332f71d063f968ddba
parent0bb9167fa4c5d972f3a4640b185e33c0fbd3c5ee
block/011: recover test target NVME device capacity

The test case runs fio while disabling and enabling PCI device of the
test target block device. When the block device is a NVME PCI device,
the test triggers NVME controller reset. When an error happens during
the reset, NVME PCI driver marks zero capacity for the device. This
zero capacity device causes failures of the following test cases.

To avoid the failures by zero device capacity, check the capacity at the
test end. If it is zero, remove the device and rescan PCI bus to detect
the device again, and regain the correct capacity.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/block/011