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 <maciej.szwed@intel.com> Change-Id: Ia728d1fc207375ddcb3b70b5081ddcffa9f99027 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449789 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>
This commit is contained in:
parent
6e947d19e2
commit
8256cecf39
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user