ZFS: spa_deadman -> vdev_deadman -> sx_xlock

Andriy Gapon avg at FreeBSD.org
Fri Jan 27 17:07:11 UTC 2017


There is a fundamental problem with the spa_deadman code.
The function is a callout and callouts must not sleep.
On the other hand, on FreeBSD we implemented illumos mutexes as sx locks.
As a result, if the deadman timer ever fires we can easily violate the rule.
With INVARIANTS that would result in a panic.
Not sure how the problem would manifest itself without INVARIANTS.

In either case, I would appreciate any suggestions on how to fix the problem.
Thanks!
-- 
Andriy Gapon


More information about the freebsd-fs mailing list