bdev: Fix the bug that counters for copy command were not reset
Fix the bug that counters for copy command, bytes_copied, num_copy_ops, and copy_latency_ticks were not reset via bdev_reset_io_stat() function. Reported-by: Richael Zhuang <richael.zhuang@arm.com> Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: Ia7ad415d051a010e515c21fcb5c73f8835c37f78 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16185 Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
075b0d1736
commit
f287da5cb0
@ -3786,9 +3786,12 @@ bdev_reset_io_stat(struct spdk_bdev_io_stat *stat, enum bdev_reset_stat_mode mod
|
|||||||
stat->num_write_ops = 0;
|
stat->num_write_ops = 0;
|
||||||
stat->bytes_unmapped = 0;
|
stat->bytes_unmapped = 0;
|
||||||
stat->num_unmap_ops = 0;
|
stat->num_unmap_ops = 0;
|
||||||
|
stat->bytes_copied = 0;
|
||||||
|
stat->num_copy_ops = 0;
|
||||||
stat->read_latency_ticks = 0;
|
stat->read_latency_ticks = 0;
|
||||||
stat->write_latency_ticks = 0;
|
stat->write_latency_ticks = 0;
|
||||||
stat->unmap_latency_ticks = 0;
|
stat->unmap_latency_ticks = 0;
|
||||||
|
stat->copy_latency_ticks = 0;
|
||||||
|
|
||||||
if (stat->io_error != NULL) {
|
if (stat->io_error != NULL) {
|
||||||
memset(stat->io_error, 0, sizeof(struct spdk_bdev_io_error_stat));
|
memset(stat->io_error, 0, sizeof(struct spdk_bdev_io_error_stat));
|
||||||
|
Loading…
Reference in New Issue
Block a user