28a44891f1
super->clean value signifies if blobstore was unloaded cleanly. If it was not, then during bs_load the _spdk_bs_recover() procedure if called. Meanwhile bs->clean is always set to 1 after load, causing very first blob_persist to also re-write super block with the super->clean set to 0. To signify that md has changed and possibly trigger the recovery if clean bs unload does not occur. When the re-write of super block succeeds the bs->clean is set to 0, because further re-writes of super block are not needed on next blob persist. This patch resolves issue when: 1) reading super block fails - execution should backoff, to prevent writing an empty buffer as super block ! 2) writing super->clean = 0 to the super block fails - execution again should fail, and bs->clean should not be set to 0. It will cause next persist to attempt re-write again. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ia07cc5c6c107310059b50886edb7283c176b9169 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1164 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> |
||
---|---|---|
.. | ||
include | ||
lib | ||
Makefile | ||
unittest.sh |