lib/bdev: Add comment to bdev_io_put_buf() when unsetting bounce buffer

To clarify what seems like it might be unintentional.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id14b49e8b7bc2372ecb8dd7579e6797a395c2cf2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477363
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
paul luse 2019-12-09 21:34:56 +00:00 committed by Tomasz Zawadzki
parent bf4db834b9
commit d68459fcb3

View File

@ -682,7 +682,7 @@ _bdev_io_unset_bounce_buf(struct spdk_bdev_io *bdev_io)
bdev_io->internal.bounce_iov.iov_base,
bdev_io->internal.bounce_iov.iov_len);
}
/* set orignal buffer for this io */
/* set original buffer for this io */
bdev_io->u.bdev.iovcnt = bdev_io->internal.orig_iovcnt;
bdev_io->u.bdev.iovs = bdev_io->internal.orig_iovs;
/* disable bouncing buffer for this io */
@ -703,6 +703,9 @@ _bdev_io_unset_bounce_buf(struct spdk_bdev_io *bdev_io)
bdev_io->internal.orig_md_buf = NULL;
}
/* We want to free the bounce buffer here since we know we're done with it (as opposed
* to waiting for the conditional free of internal.buf in spdk_bdev_free_io()).
*/
bdev_io_put_buf(bdev_io);
}