Commit 882558f7 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki Committed by Daniel Verkamp
Browse files

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: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/409164


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent abeba455
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
	}