When new writes come from different threads, cluster allocations can happen many times at once. The corresponding cluster number for the map is determined via _spdk_bs_allocate_cluster() and kept in ctx->new_cluster. The cluster itself is inserted into the map only on md_thread. When there is conflict of two threads allocating same cluster, message is returned to the losting thread to release the cluster. Before this patch, on such failure the cluster to release was calcualted from the page. This resulted in releasing the cluster claim for thread that actually won it. This patch makes it so that cluster allocated and save in ctx is used instead. Change-Id: Id10811b887f673f9b89e41e0637d4422f1d7270d Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452625 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> |
||
---|---|---|
.. | ||
bdev | ||
blob_bs_dev.c | ||
blobstore.c | ||
blobstore.h | ||
Makefile | ||
request.c | ||
request.h | ||
zeroes.c |