Spdk/examples/nvme
Krzysztof Karas 91b8f349fd hotplug: let device insertions/removals take priority
When running io_loop() let insertions and removals counters
take precedence before timeouts. This will let us determine
the cause of premature io_loop() exit in case of timeout.

Consider two scenarios:
First:
 1. Hotplug app records enough insertions/removals
 2. During "if (now > tsc_end)" check it also notices that
    it should terminate due to time constraint
 3. Hotplug exits using the timeout condition, because
    enough time has passed and no error is printed at
    this point.

Second:
 1. Hotplug app did not record enough insertions/removals
    during app runtime
 2. During "if (now > tsc_end)" check it also notices that
    it should terminate due to time constraint
 3. Hotplug exits using the timeout condition, because
    enough time has passed and no error is printed at
    this point.

After prioritizing the check on counters we avoid the first
scenario and timeout will be checked after the counters
were confirmed to be less than expected value, allowing us
to determine the cause of failure earlier.

Additionally added an errorlog to the body of the if checking
for timeout to signal this failure.

First part of the series fixing #2201.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I3f6f9c5c95e82e0a003419fcf181d858ffbd94dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15964
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-09 11:16:50 +00:00
..
abort example/nvme: Adjust logic lines about if (current_queue_depth > 0) 2022-12-07 08:42:55 +00:00
arbitration update Intel copyright notices 2022-11-10 08:28:53 +00:00
cmb_copy update Intel copyright notices 2022-11-10 08:28:53 +00:00
discovery_aer update Intel copyright notices 2022-11-10 08:28:53 +00:00
fio_plugin update Intel copyright notices 2022-11-10 08:28:53 +00:00
hello_world update Intel copyright notices 2022-11-10 08:28:53 +00:00
hotplug hotplug: let device insertions/removals take priority 2023-01-09 11:16:50 +00:00
identify update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_manage examples/nvme_manage: check the valid address parse 2023-01-05 23:26:02 +00:00
perf perf: Support setting IPv4 type of service (TOS) 2023-01-05 19:54:53 +00:00
pmr_persistence check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
reconnect update Intel copyright notices 2022-11-10 08:28:53 +00:00
Makefile update Intel copyright notices 2022-11-10 08:28:53 +00:00