+7
−1
Loading
For testing purposes, the stub app creates a sentinel file that scripts can look for to see when the stub is ready to start accepting secondary processes. We need to wait until after spdk_nvme_probe() completes which can take a while depending on init time of the SSDs. The stub app will unlink the file on normal shutdown, but if it crashes unexpectedly, the file will remain and prevent the stub app from starting again until user manually deletes it. So immediately unlink the sentinel file at start of stub_start() - we know at this point that *if* the file still exists it must be left over from a crashed stub and not a currently running stub (since we can't get to this point if there's already a primary process at this shm_id). Then create the file after the spdk_nvme_probe() is complete. Signed-off-by:Jim Harris <jim.harris@samsung.com> Change-Id: I46cfc9fb1b76d859c9af5c4bbb008ca16b529b28 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22477 Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>