blobfs: remove the assert.

The caller function needs to judge whether the buf is
allocated. Putting assert here is easy for debugging,
but not be friendly for real use.

Change-Id: I3c8e66bc95cbd2f9bc87f26335f249c32e339da4
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448697
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ziye Yang 2019-03-22 18:07:42 +08:00 committed by Jim Harris
parent b1c5a962d4
commit fa2d95b3fe

View File

@ -1839,8 +1839,8 @@ cache_insert_buffer(struct spdk_file *file, uint64_t offset)
* semaphore to block until a buffer becomes available.
*/
if (count++ == 100) {
SPDK_ERRLOG("could not allocate cache buffer\n");
assert(false);
SPDK_ERRLOG("Could not allocate cache buffer for file=%p on offset=%jx\n",
file, offset);
free(buf);
return NULL;
}