summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme_test.c
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-10-08 15:47:22 +0000
committerjimharris <jimharris@FreeBSD.org>2013-10-08 15:47:22 +0000
commitbb66cfd2ae8464ce44d16ab33621589703029906 (patch)
treef4b464ac76cec93bda88ecae18628e7a2b88fd08 /sys/dev/nvme/nvme_test.c
parent509a7951936691b0bf8b3257febf8fa9a25dbdc0 (diff)
downloadFreeBSD-src-bb66cfd2ae8464ce44d16ab33621589703029906.zip
FreeBSD-src-bb66cfd2ae8464ce44d16ab33621589703029906.tar.gz
Extend some 32-bit fields and variables to 64-bit to prevent overflow
when calculating stats in nvmecontrol perftest. Sponsored by: Intel Reported by: Joe Golio <joseph.golio@emc.com> Reviewed by: carl Approved by: re (hrs) MFC after: 1 week
Diffstat (limited to 'sys/dev/nvme/nvme_test.c')
-rw-r--r--sys/dev/nvme/nvme_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/nvme/nvme_test.c b/sys/dev/nvme/nvme_test.c
index 89bcc00..24f65cc 100644
--- a/sys/dev/nvme/nvme_test.c
+++ b/sys/dev/nvme/nvme_test.c
@@ -53,7 +53,7 @@ struct nvme_io_test_thread {
void *buf;
uint32_t size;
uint32_t time;
- uint32_t io_completed;
+ uint64_t io_completed;
};
struct nvme_io_test_internal {
@@ -66,7 +66,7 @@ struct nvme_io_test_internal {
uint32_t td_active;
uint32_t td_idx;
uint32_t flags;
- uint32_t io_completed[NVME_TEST_MAX_THREADS];
+ uint64_t io_completed[NVME_TEST_MAX_THREADS];
};
static void
@@ -90,8 +90,8 @@ nvme_ns_bio_test(void *arg)
struct cdev *dev;
void *buf;
struct timeval t;
- uint64_t offset;
- uint32_t idx, io_completed = 0;
+ uint64_t io_completed = 0, offset;
+ uint32_t idx;
#if __FreeBSD_version >= 900017
int ref;
#endif
OpenPOWER on IntegriCloud