blobstore: do not produce error when requesting number of clones
One of intended uses of spdk_blob_get_clones() is to retrive number of clones from a snapshot. This is done by passing NULL pointer for destination array. In this case SPDK_ERRLOG is superfluous, as ENOMEM should be handled appropriately by called. Example of correct usage producing this error log is in vbdev_lvol.c vbdev_lvol_dump_info_json(). Change-Id: I032ca12af01caddf6f540e39d49c2adba40a6ff1 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/409164 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
abeba45533
commit
882558f7e8
@ -4919,7 +4919,6 @@ spdk_blob_get_clones(struct spdk_blob_store *bs, spdk_blob_id blobid, spdk_blob_
|
||||
}
|
||||
|
||||
if (ids == NULL || *count < snapshot_entry->clone_count) {
|
||||
SPDK_ERRLOG("Not enough space in array\n");
|
||||
*count = snapshot_entry->clone_count;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user