[Bug 202358] [patch] [zfs] fix possible assert fail in sa_handle_get_from_db()

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Aug 20 07:21:28 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202358

Andriy Gapon <avg at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gibbs at FreeBSD.org,
                   |                            |mav at FreeBSD.org

--- Comment #1 from Andriy Gapon <avg at FreeBSD.org> ---
(In reply to luke.tw from comment #0)
I think that you correctly identified the problem.  And what you describe seems
to be only the part of the problem.  It seems that illumos kmem cache API is
used incorrectly for sa_cache.  Its usage resembles how FreeBSD uma(9) could be
used and that almost works with FreeBSD's emulation of kmem cache.
The difference is that kmem_cache_create() is not as flexible as uma_create():
whereas the latter supports two ways of initialization an object - via
init/fini and constructor/destructor, the former has only
constructor/destructor support:
http://illumos.org/man/9F/kmem_cache_create
But the kmem cache's constructor and destructor work similarly to how the init
and fini work in uma(9).  And, apparently, that is a source of the confusion
here.
I am surprised that there are no bug reports about this API misuse from illumos
users yet.

It seems that the problem was introduced as a part of bigger changes in base
r286575 which is an import of
illumos/illumos-gate at bc9014e6a81272073b9854d9f65dd59e18d18c35

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list