On 02.09.2012 02:27, Chuck Silvers wrote:
Ah, ic, but islocked() comes from genfs. Given the current situation, it is more sensible to make VOP_ISLOCKED() return LK_EXCLUSIVE unconditionally for ZFS and see if that gets DIAGNOSTIC builds a bit further.no, that's completely wrong. ZFS's VOP_LOCK() currently doesn't actually lock anything, so having its VOP_ISLOCKED() say that it did is just crazy. all that does is defeat the assertions which are correctly pointing out that ZFS has a bug.
Of course it's broken, nobody could debate otherwise. However, there is zero chance that nobody notices to implement locking before zfs is declared production ready because of masking the problem. The really really concerned parties would add a test case which checks VOP_ISLOCKED() in all three cases to make absolutely sure the problem is detected.
So we went from broken to broken, with the exception that test reports are now more useful, which makes zfs an attractive target for the proverbial casual vfs hacker.