bdevperf: update the calculation of buffer content

This is to fix issue #2130.

Change-Id: I017f130f6247d49128839e664929db6cad521002
Signed-off-by: Xin Huang <xin.huang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9372
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
uubs 2021-09-02 17:00:23 +02:00 committed by Jim Harris
parent cb85bf0b49
commit 064cc9edac

View File

@ -279,7 +279,7 @@ generate_data(void *buf, int buf_len, int block_size, void *md_buf, int md_size,
while (offset_blocks < num_blocks) { while (offset_blocks < num_blocks) {
inner_offset = 0; inner_offset = 0;
while (inner_offset < data_block_size) { while (inner_offset < data_block_size) {
*(uint32_t *)buf = offset_blocks; *(uint32_t *)buf = offset_blocks + inner_offset;
inner_offset += sizeof(uint32_t); inner_offset += sizeof(uint32_t);
buf += sizeof(uint32_t); buf += sizeof(uint32_t);
} }