Revert r244549.

This change was originally intended to account for test kthreads under
the nvmecontrol process, but jhb indicated it may not be safe to
associate kthreads with userland processes and this could have
unintended consequences.

I did not observe any problems with this change, but my testing didn't
exhaust the kinds of corner cases that could cause problems.  It is not
that important to account for these test threads under nvmecontrol, so I
am just reverting this change for now.

On a related note, the part of this patch for <= 7.x fails compilation
so reverting this fixes that too.

Suggested by: jhb
This commit is contained in:
Jim Harris 2013-01-07 21:35:25 +00:00
parent c5d04c4c3b
commit 43e35466de

View File

@ -287,10 +287,10 @@ nvme_ns_test(struct nvme_namespace *ns, u_long cmd, caddr_t arg)
for (i = 0; i < io_test->num_threads; i++)
#if __FreeBSD_version >= 800004
kthread_add(fn, io_test_internal,
curproc, NULL, 0, 0, "nvme_io_test[%d]", i);
NULL, NULL, 0, 0, "nvme_io_test[%d]", i);
#else
kthread_create(fn, io_test_internal,
curproc, 0, 0, "nvme_io_test[%d]", i);
NULL, 0, 0, "nvme_io_test[%d]", i);
#endif
tsleep(io_test_internal, 0, "nvme_test", io_test->time * 2 * hz);