Spdk/test/unit/lib/bdev/bdev.c
Changpeng Liu ad96f83787 bdev: don't call spdk_bdev_free_io() for the error case
Existing code in spdk_bdev_write_zeroes_blocks() will call spdk_bdev_free_io()
for the error case, which will cause assertion because the bdev_io isn't
submitted to the backend yet, so we will check the condtion first to
avoid the error case.

Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453491 (master)

(cherry picked from commit 9da1c7384d)
Change-Id: If27d78217f709a3315e74c00869d345abd6b9a69
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457288
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-18 19:00:37 +00:00
..
.gitignore test: add unit test framework for bdev.c 2017-07-05 15:09:46 -04:00
bdev_ut.c bdev: don't call spdk_bdev_free_io() for the error case 2019-06-18 19:00:37 +00:00
Makefile test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00