This emulates illumos' taskq_wait() in that it doesn't return until the
queue is completely empty. This fixes some races when shutting down
ZFS as described in PR 227784.
Details
Details
- Reviewers
mav avg jhb allanjude cem - Group Reviewers
manpages - Commits
- rS340731: Use taskqueue_quiesce(9) to implement taskq_wait().
rS340730: Add a taskqueue_quiesce(9) KPI.
wulf@ reports that this fixes the panic reported in PR 227784.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
The code and documentation look good; I'm just not sure if we want a new API for this, or if changing taskqueue_drain_all()'s behavior to match this would be unobjectionable.
Comment Actions
Any thoughts on this approach? To provide a bit more detail, the issue is that some ZFS tasks may recursively enqueue tasks, but a taskqueue_drain_all() doesn't wait for them. It might be that we could just change the behaviour of taskqueue_drain_all() instead.
Comment Actions
Looks like the LinuxKPI's flush_workqueue() maps to the existing taskqueue_drain_all(), so we probably don't want to change the existing behaviour.