5d5053373f
ctx->extent_page signifies if page was allocated for insertion. 1) It is possible for a thread to claim extent page on its own thread, and put it in ctx->extent_page. If conflicting thread allocates another ctx->extent_page, then it should be freed. This does not mean failure to insert cluster. As different threads could have been trying to allocate different clusters, so condition on line 6716 does not cover it. If so then it shouldn't be an issue to release the claimed ctx->extent_page and proceed with updating the extent page which originally won the race. NOTE: if clusters were conflicting, then extent_page is freed in _spdk_blob_insert_cluster_cpl(). 2) At this point of _spdk_blob_insert_cluster_msg() we already verified that there already is extent page allocated at "*extent_page". In such case ctx->extent_page will be 0, and should not be used. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Id5b57c88248890eee60d2e7dbecbd984c98b561b Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482867 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>