bdev: free bdev_io in write_zeroes emulation
When emulating write_zeroes commands on device that
don't natively support it, we submit a write with
a zeroed buffer. We used to just reuse the original
bdev_io, but that was recently changed due to other
splitting code added for iovs. But when making those
changes, we forgot to free the bdev_io for the
write that was sent down to the device.
Fixes: 183f37e8
(bdev: do not reuse bdev_io when...)
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If08782c65f6305c0a9f9d15d74fd8823e1158e9b
Reviewed-on: https://review.gerrithub.io/424733
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
e133dcd850
commit
73c8b61cac
@ -3447,6 +3447,8 @@ _spdk_bdev_write_zero_buffer_done(struct spdk_bdev_io *bdev_io, bool success, vo
|
||||
{
|
||||
struct spdk_bdev_io *parent_io = cb_arg;
|
||||
|
||||
spdk_bdev_free_io(bdev_io);
|
||||
|
||||
if (!success) {
|
||||
parent_io->internal.status = SPDK_BDEV_IO_STATUS_FAILED;
|
||||
parent_io->internal.cb(parent_io, SPDK_BDEV_IO_STATUS_FAILED, parent_io->internal.caller_ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user