lib/blob: notify user when bs_create_blob
fail
This patch fix issue: #2346 Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com> Change-Id: Ibbc95bcf47300653066a85769536853e7608f213 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16758 Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
8ecf7ae50b
commit
57bd108ad7
@ -5823,17 +5823,17 @@ bs_create_blob(struct spdk_blob_store *bs,
|
|||||||
|
|
||||||
SPDK_DEBUGLOG(blob, "Creating blob with id %" PRIu64 " at page %u\n", id, page_idx);
|
SPDK_DEBUGLOG(blob, "Creating blob with id %" PRIu64 " at page %u\n", id, page_idx);
|
||||||
|
|
||||||
|
spdk_blob_opts_init(&opts_local, sizeof(opts_local));
|
||||||
|
if (opts) {
|
||||||
|
blob_opts_copy(opts, &opts_local);
|
||||||
|
}
|
||||||
|
|
||||||
blob = blob_alloc(bs, id);
|
blob = blob_alloc(bs, id);
|
||||||
if (!blob) {
|
if (!blob) {
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
spdk_blob_opts_init(&opts_local, sizeof(opts_local));
|
|
||||||
if (opts) {
|
|
||||||
blob_opts_copy(opts, &opts_local);
|
|
||||||
}
|
|
||||||
|
|
||||||
blob->use_extent_table = opts_local.use_extent_table;
|
blob->use_extent_table = opts_local.use_extent_table;
|
||||||
if (blob->use_extent_table) {
|
if (blob->use_extent_table) {
|
||||||
blob->invalid_flags |= SPDK_BLOB_EXTENT_TABLE;
|
blob->invalid_flags |= SPDK_BLOB_EXTENT_TABLE;
|
||||||
@ -5879,6 +5879,8 @@ bs_create_blob(struct spdk_blob_store *bs,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
SPDK_ERRLOG("Failed to create blob: %s, size in clusters/size: %lu (clusters)\n",
|
||||||
|
spdk_strerror(rc), opts_local.num_clusters);
|
||||||
if (blob != NULL) {
|
if (blob != NULL) {
|
||||||
blob_free(blob);
|
blob_free(blob);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user