blobfs: exit the app after the failure of memory allocation
When testing blobfs, the allocation of cache buffer may fail without any error information, users may get segment fault error after that. Change-Id: I6dc8ee4b93c6a9109aba193f599197caa4c4c383 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/422943 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
5d0db530d4
commit
282463f53c
@ -218,6 +218,11 @@ __initialize_cache(void)
|
||||
CACHE_BUFFER_SIZE,
|
||||
SPDK_MEMPOOL_DEFAULT_CACHE_SIZE,
|
||||
SPDK_ENV_SOCKET_ID_ANY);
|
||||
if (!g_cache_pool) {
|
||||
SPDK_ERRLOG("Create mempool failed, you may "
|
||||
"increase the memory and try again\n");
|
||||
assert(false);
|
||||
}
|
||||
TAILQ_INIT(&g_caches);
|
||||
pthread_spin_init(&g_caches_lock, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user