Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2017 19:06:13 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        freebsd-fs <freebsd-fs@FreeBSD.org>
Subject:   ZFS: spa_deadman -> vdev_deadman -> sx_xlock
Message-ID:  <9f6712e4-f6f4-670a-11b8-babfad9a9463@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9f6712e4-f6f4-670a-11b8-babfad9a9463>