lib: Return instead of abort() in bdev

Return NULL on resource failure (spdk_mem_get) instead of
abort()'ing in static bdev function.

Change-Id: I0ee2ce4b7e81cf80546119e3db27c987fa912749
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403578
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Lance Hartmann 2018-03-12 16:26:35 -04:00 committed by Jim Harris
parent ca91d671e3
commit 01d6310742

View File

@ -804,7 +804,7 @@ spdk_bdev_get_io(struct spdk_io_channel *_ch)
bdev_io = spdk_mempool_get(g_bdev_mgr.bdev_io_pool); bdev_io = spdk_mempool_get(g_bdev_mgr.bdev_io_pool);
if (!bdev_io) { if (!bdev_io) {
SPDK_ERRLOG("Unable to get spdk_bdev_io\n"); SPDK_ERRLOG("Unable to get spdk_bdev_io\n");
abort(); return NULL;
} }
} }