+27
−23
Loading
I/Os may be submitted on multiple channels simultaneously. The number of injected errors cannot be decremented non-atomically. This parameter is currently non-functionnal if more than 1 I/O thread is created, because the number of errors may wrap around back to non-null values instead of being decremented to 0. This commit does the following: - the number of errors is decremented atomically at the error type lookup - whether an error should be injected depends on the success of the compare-and-swap operation - the injected error type is stored on the I/O context (don't do lookup-decrement a second time) - add a VBDEV_IO_NO_ERROR case to complete the error types enum Change-Id: I6b3182ff80dbc5dc08216e314ba6cda34fbe4c15 Signed-off-by:Nathan Claudel <nathan.claudel@kalrayinc.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23189 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Community-CI: Mellanox Build Bot