From 8256cecf3951bec85dc16a4aee53307e44a579cd Mon Sep 17 00:00:00 2001 From: Maciej Szwed Date: Mon, 1 Apr 2019 14:09:41 +0200 Subject: [PATCH] blobstore: rename resize_in_progress to locked_operation_in_progress This is a part of future changes to block blob operations that may cause race conditions between each other. Signed-off-by: Maciej Szwed Change-Id: Ia728d1fc207375ddcb3b70b5081ddcffa9f99027 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449789 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/blob/blobstore.c | 8 ++++---- lib/blob/blobstore.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index 0a86fea9b..7f1e8401c 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -4889,7 +4889,7 @@ _spdk_bs_resize_unfreeze_cpl(void *cb_arg, int rc) rc = ctx->rc; } - ctx->blob->resize_in_progress = false; + ctx->blob->locked_operation_in_progress = false; ctx->cb_fn(ctx->cb_arg, rc); free(ctx); @@ -4901,7 +4901,7 @@ _spdk_bs_resize_freeze_cpl(void *cb_arg, int rc) struct spdk_bs_resize_ctx *ctx = (struct spdk_bs_resize_ctx *)cb_arg; if (rc != 0) { - ctx->blob->resize_in_progress = false; + ctx->blob->locked_operation_in_progress = false; ctx->cb_fn(ctx->cb_arg, rc); free(ctx); return; @@ -4931,7 +4931,7 @@ spdk_blob_resize(struct spdk_blob *blob, uint64_t sz, spdk_blob_op_complete cb_f return; } - if (blob->resize_in_progress) { + if (blob->locked_operation_in_progress) { cb_fn(cb_arg, -EBUSY); return; } @@ -4942,7 +4942,7 @@ spdk_blob_resize(struct spdk_blob *blob, uint64_t sz, spdk_blob_op_complete cb_f return; } - blob->resize_in_progress = true; + blob->locked_operation_in_progress = true; ctx->cb_fn = cb_fn; ctx->cb_arg = cb_arg; ctx->blob = blob; diff --git a/lib/blob/blobstore.h b/lib/blob/blobstore.h index f45a61318..6aa00ddd2 100644 --- a/lib/blob/blobstore.h +++ b/lib/blob/blobstore.h @@ -148,7 +148,7 @@ struct spdk_blob { TAILQ_ENTRY(spdk_blob) link; uint32_t frozen_refcnt; - bool resize_in_progress; + bool locked_operation_in_progress; enum blob_clear_method clear_method; };