c049304a95
spdk_pci_device_claim() could create a file on the filesystem that couldn't be deleted programatically. It could only be overwritten - e.g. by another spdk instance - but this didn't really work if that another instance had less privileges and hence no access to the previous file. This is exactly the case we're seeing on our CI when running SPDK as non-root. In general it's a good idea not to leave any leftover files, so now we'll delete the pci claim file when the spdk process exits. spdk_pci_device_claim() used to return a file descriptor that could be simply closed to "un-claim" the device. It'll now return only a return code. The fd will be stored inside spdk_pci_device and will be closed either when user calls the newly introduced spdk_pci_device_unclaim(), or when the device is detached. We'll still need to clean up those files somewhere in our test scripts (probably ./setup.sh cleanup) to clean up after crashed processes or so - but we don't necessarily want to run such scripts inside the autotest whenever a non-root spdk is about to be started. Change-Id: I797e079417bb56491013cc5b92f0f0d14f451d18 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467107 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile | ||
pci_ut.c |