summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme_test.c
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-03-26 22:11:34 +0000
committerjimharris <jimharris@FreeBSD.org>2013-03-26 22:11:34 +0000
commit61a3cd77ccaa7474a0fa5821a55ad89fa7cea58d (patch)
treeb9721fc6e3a456241e04ecb5e27e06db526ce8fe /sys/dev/nvme/nvme_test.c
parent5242be57d3d5eddc6859707cd02c511befa48366 (diff)
downloadFreeBSD-src-61a3cd77ccaa7474a0fa5821a55ad89fa7cea58d.zip
FreeBSD-src-61a3cd77ccaa7474a0fa5821a55ad89fa7cea58d.tar.gz
Change a number of malloc(9) calls to use M_WAITOK instead of
M_NOWAIT. Sponsored by: Intel Suggested by: carl Reviewed by: carl
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 93e2ed9..d09c571 100644
--- a/sys/dev/nvme/nvme_test.c
+++ b/sys/dev/nvme/nvme_test.c
@@ -96,7 +96,7 @@ nvme_ns_bio_test(void *arg)
int ref;
#endif
- buf = malloc(io_test->size, M_NVME, M_NOWAIT);
+ buf = malloc(io_test->size, M_NVME, M_WAITOK);
idx = atomic_fetchadd_int(&io_test->td_idx, 1);
dev = io_test->ns->cdev;
@@ -217,11 +217,11 @@ nvme_ns_io_test(void *arg)
struct nvme_completion cpl;
int error;
- tth = malloc(sizeof(*tth), M_NVME, M_NOWAIT | M_ZERO);
+ tth = malloc(sizeof(*tth), M_NVME, M_WAITOK | M_ZERO);
tth->ns = io_test->ns;
tth->opc = io_test->opc;
memcpy(&tth->start, &io_test->start, sizeof(tth->start));
- tth->buf = malloc(io_test->size, M_NVME, M_NOWAIT);
+ tth->buf = malloc(io_test->size, M_NVME, M_WAITOK);
tth->size = io_test->size;
tth->time = io_test->time;
tth->idx = atomic_fetchadd_int(&io_test->td_idx, 1);
@@ -269,7 +269,7 @@ nvme_ns_test(struct nvme_namespace *ns, u_long cmd, caddr_t arg)
return;
io_test_internal = malloc(sizeof(*io_test_internal), M_NVME,
- M_NOWAIT | M_ZERO);
+ M_WAITOK | M_ZERO);
io_test_internal->opc = io_test->opc;
io_test_internal->ns = ns;
io_test_internal->td_active = io_test->num_threads;
OpenPOWER on IntegriCloud