From c1a41845cfd3c885a6ea9243cc23ccfb0cd37e60 Mon Sep 17 00:00:00 2001 From: sunshihao520 Date: Thu, 13 May 2021 20:57:07 +0800 Subject: [PATCH] lib/bdev: Change spdk_bdev_read_blocks_with_md arg offset definiton from int64_t to uint64_t. Signed-off-by: sunshihao520 Change-Id: I25c3ae4f12d0ab4e2f3811e36028a04a1f32d862 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7869 Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto Reviewed-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins --- CHANGELOG.md | 3 +++ include/spdk/bdev.h | 2 +- lib/bdev/bdev.c | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b1f9310aa..1d2cdf84c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## v21.07: (Upcoming Release) +### bdev +Change `spdk_bdev_read_blocks_with_md` arg offset definiton from int64_t to uint64_t. + ### dpdk Updated DPDK submodule to DPDK 21.02. diff --git a/include/spdk/bdev.h b/include/spdk/bdev.h index 19b265735f..36cdb02a30 100644 --- a/include/spdk/bdev.h +++ b/include/spdk/bdev.h @@ -803,7 +803,7 @@ int spdk_bdev_read_blocks(struct spdk_bdev_desc *desc, struct spdk_io_channel *c * * -ENOMEM - spdk_bdev_io buffer cannot be allocated */ int spdk_bdev_read_blocks_with_md(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch, - void *buf, void *md, int64_t offset_blocks, uint64_t num_blocks, + void *buf, void *md, uint64_t offset_blocks, uint64_t num_blocks, spdk_bdev_io_completion_cb cb, void *cb_arg); /** diff --git a/lib/bdev/bdev.c b/lib/bdev/bdev.c index 42d82c6817..3c82cef970 100644 --- a/lib/bdev/bdev.c +++ b/lib/bdev/bdev.c @@ -3658,7 +3658,7 @@ _bdev_io_check_md_buf(const struct iovec *iovs, const void *md_buf) static int bdev_read_blocks_with_md(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch, void *buf, - void *md_buf, int64_t offset_blocks, uint64_t num_blocks, + void *md_buf, uint64_t offset_blocks, uint64_t num_blocks, spdk_bdev_io_completion_cb cb, void *cb_arg) { struct spdk_bdev *bdev = spdk_bdev_desc_get_bdev(desc); @@ -3715,7 +3715,7 @@ spdk_bdev_read_blocks(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch, int spdk_bdev_read_blocks_with_md(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch, - void *buf, void *md_buf, int64_t offset_blocks, uint64_t num_blocks, + void *buf, void *md_buf, uint64_t offset_blocks, uint64_t num_blocks, spdk_bdev_io_completion_cb cb, void *cb_arg) { struct iovec iov = {