From fa2d95b3fe66e7f5c543eaef89fa00d4eaa0e6e7 Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Fri, 22 Mar 2019 18:07:42 +0800 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448697 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Jim Harris --- lib/blobfs/blobfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/blobfs/blobfs.c b/lib/blobfs/blobfs.c index cc0c93fae7..ebd793613d 100644 --- a/lib/blobfs/blobfs.c +++ b/lib/blobfs/blobfs.c @@ -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; }