svn commit: r344359 - head/cddl/contrib/opensolaris/lib/libzpool/common

Andriy Gapon avg at FreeBSD.org
Wed Feb 20 13:19:09 UTC 2019


Author: avg
Date: Wed Feb 20 13:19:08 2019
New Revision: 344359
URL: https://svnweb.freebsd.org/changeset/base/344359

Log:
  fix userland illumos taskq code to pass relative timeout to cv_timedwait
  
  Unlike illumos, FreeBSD cv_timedwait requires a relative timeout.  That
  applies both to the kernel illumos compatibility code and to the
  userland "fake kernel" code.
  
  MFC after:	2 weeks
  Sponsored by:	Panzura

Modified:
  head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c

Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c	Wed Feb 20 11:58:40 2019	(r344358)
+++ head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c	Wed Feb 20 13:19:08 2019	(r344359)
@@ -79,8 +79,13 @@ again:	if ((t = tq->tq_freelist) != NULL && tq->tq_nal
 			 * immediately retry the allocation.
 			 */
 			tq->tq_maxalloc_wait++;
+#ifdef __FreeBSD__
 			rv = cv_timedwait(&tq->tq_maxalloc_cv,
+			    &tq->tq_lock, hz);
+#else
+			rv = cv_timedwait(&tq->tq_maxalloc_cv,
 			    &tq->tq_lock, ddi_get_lbolt() + hz);
+#endif
 			tq->tq_maxalloc_wait--;
 			if (rv > 0)
 				goto again;		/* signaled */


More information about the svn-src-head mailing list